ÔõÑù½â¾öLinuxϵͳÖзºÆðµÄÀú³ÌÕ¼Óùý¶àÄÚ´æÎÊÌâ
ÔõÑù½â¾ölinuxϵͳÖзºÆðµÄÀú³ÌÕ¼Óùý¶àÄÚ´æÎÊÌâ
ÔÚʹÓÃLinuxϵͳʱ£¬ÎÒÃÇÓÐʱ»áÓöµ½Àú³ÌÕ¼Óùý¶àÄÚ´æµÄÎÊÌ⣬Õâ²»µ«»áµ¼ÖÂϵͳ±äµÃ»ºÂý£¬»¹¿ÉÄܵ¼ÖÂϵͳÍ߽⡣ΪÏàʶ¾öÕâ¸öÎÊÌ⣬ÎÒÃÇÐèÒª½ÓÄÉһЩ²½·¥À´ÓÅ»¯ÏµÍ³ÄÚ´æµÄʹÓᣱ¾ÎĽ«ÏÈÈÝһЩ³£¼ûµÄÒªÁìÀ´½â¾öLinuxϵͳÖзºÆðµÄÀú³ÌÕ¼Óùý¶àÄÚ´æÎÊÌâ¡£
Ò»¡¢Éó²éÄÚ´æʹÓÃÇéÐÎ
Ê×ÏÈ£¬ÎÒÃÇÐèÒªÏàʶϵͳµÄÄÚ´æʹÓÃÇéÐΡ£¿ÉÒÔͨ¹ýÏÂÁî”free -h”»ò”top”À´Éó²éϵͳµÄÄÚ´æʹÓÃÇéÐΡ£ÕâЩÏÂÁÏÔʾϵͳµÄ×ÜÄÚ´æÁ¿¡¢ÒÑʹÓõÄÄÚ´æÁ¿¡¢Ê£ÓàµÄÄÚ´æÁ¿ÒÔ¼°»º´æºÍ½»Á÷ÇøµÄʹÓÃÇéÐεÈÐÅÏ¢¡£
¶þ¡¢²éÕÒÕ¼ÓÃÄÚ´æ¹ý¸ßµÄÀú³Ì
½ÓÏÂÀ´£¬ÎÒÃÇÐèÒªÕÒ³öÕ¼ÓÃÄÚ´æ¹ý¸ßµÄÀú³Ì¡£¿ÉÒÔͨ¹ýÏÂÁî”top”»ò”ps aux –sort=-%mem”À´Áгö¸÷¸öÀú³ÌµÄÄÚ´æʹÓÃÇéÐΡ£Í¨¹ýÊÓ²ìÀú³ÌµÄPID£¨Àú³Ì±êʶ·û£©ºÍÄÚ´æʹÓÃÁ¿£¬ÎÒÃÇ¿ÉÒÔÕÒµ½Õ¼ÓÃÄÚ´æ¹ý¶àµÄÀú³Ì¡£
Èý¡¢ÓÅ»¯Õ¼ÓÃÄÚ´æ¹ý¶àµÄÀú³Ì
Õë¶ÔÕ¼ÓÃÄÚ´æ¹ý¶àµÄÀú³Ì£¬ÎÒÃÇ¿ÉÒÔ½ÓÄÉһЩÓÅ»¯²½·¥À´ïÔÌÆäÄÚ´æÕ¼Óá£
ÖØÆôÀú³Ì£ºÓÐʱ¼ä£¬Àú³Ì»áÓÉÓÚijЩԵ¹ÊÔÓɵ¼ÖÂÄÚ´æÕ¼Óùý¶à¡£´Ëʱ£¬ÎÒÃÇ¿ÉÒÔʵÑéÖØÆô¸ÃÀú³Ì£¬ÖØмÓÔØ×ÊÔ´£¬µÖ´ïïÔÌÄÚ´æÕ¼ÓõÄÄ¿µÄ¡£
ÓÅ»¯´úÂ룺ÈôÊÇÀú³ÌÊÇÓÉÎÒÃÇ×Ô¼º¿ª·¢µÄÓ¦ÓóÌÐò£¬ÄÇô¿ÉÒÔͨ¹ýÓÅ»¯´úÂëÀ´ïÔÌÄÚ´æÕ¼Óá£ÀýÈ磬ïÔ̲»ÐëÒªµÄ±äÁ¿¡¢ÊÍ·ÅÎÞÓõÄÄڴ桢ʹÓúÏÊʵÄÊý¾Ý½á¹¹µÈ¡£
µ÷½âÉèÖòÎÊý£º¹ØÓÚһЩӦÓóÌÐò£¬¿ÉÄÜ¿ÉÒÔͨ¹ýµ÷½âÆäÉèÖòÎÊýÀ´ïÔÌÄÚ´æÕ¼Óá£ÀýÈ磬¹ØÓÚÊý¾Ý¿âÓ¦Ó㬿ÉÒÔͨ¹ýµ÷½â»º´æ¾Þϸ¡¢ÏÞÖÆÅþÁ¬ÊýµÈ²ÎÊýÀ´¿ØÖÆÆäÄÚ´æÕ¼Óá£
ËÄ¡¢Ê¹Óù¤¾ß¼à¿ØÄÚ´æʹÓÃÇéÐÎ
³ýÁËÊÖ¶¯ÓÅ»¯Àú³Ì£¬ÎÒÃÇ»¹¿ÉÒÔ½èÖúһЩ¹¤¾ßÀ´¼à¿ØºÍÖÎÀíϵͳµÄÄÚ´æʹÓÃÇéÐΡ£ÒÔÏÂÊÇһЩ³£¼ûµÄ¹¤¾ß£º
top£ºtopÏÂÁî¿ÉÒÔʵʱ¼à¿ØϵͳµÄ×ÊԴʹÓÃÇéÐΣ¬°üÀ¨ÄÚ´æ¡¢CPU¡¢´ÅÅ̵ȡ£
htop£ºhtopÊÇtopÏÂÁîµÄÔöÇ¿°æ±¾£¬ÌṩÁ˸üºÃµÄ½»»¥½çÃæºÍ¸ü¶àµÄ¹¦Ð§¡£
vmstat£ºvmstatÏÂÁî¿ÉÒÔ¼à¿ØϵͳµÄÐéÄâÄÚ´æ¡¢ÄÚ´æ½»Á÷ºÍIOµÈÇéÐΡ£
sar£ºsarÏÂÁî¿ÉÒÔÍøÂçϵͳµÄÐÔÄÜÊý¾Ý£¬°üÀ¨ÄÚ´æʹÓá¢CPUʹÓᢴÅÅÌIOµÈ£¬¿ÉÒÔÓÃÀ´ÆÊÎöϵͳµÄÐÔÄÜÆ¿¾±¡£
Îå¡¢ÔöÌíϵͳÄÚ´æ
ÈôÊÇÒÔÉÏÒªÁìÎÞ·¨½â¾öÎÊÌ⣬ÄÇô¿ÉÄÜÐèҪ˼Á¿ÔöÌíϵͳµÄÄÚ´æ¡£ÔöÌíϵͳÄÚ´æ¿ÉÒÔÌá¸ßϵͳµÄÐÔÄÜ£¬²¢ïÔÌÄÚ´æȱ·¦µÄΣº¦¡£
×ܽáÆðÀ´£¬½â¾öLinuxϵͳÖÐÀú³ÌÕ¼Óùý¶àÄÚ´æµÄÎÊÌâÐèÒªÎÒÃÇÏàʶϵͳµÄÄÚ´æʹÓÃÇéÐΣ¬ÕÒ³öÕ¼ÓÃÄÚ´æ¹ý¶àµÄÀú³Ì£¬²¢½ÓÄɺÏÊʵÄÓÅ»¯²½·¥À´ïÔÌÄÚ´æÕ¼Óá£Í¨¹ýʹÓù¤¾ßÀ´¼à¿ØÄÚ´æʹÓÃÇéÐκÍÔöÌíϵͳÄڴ棬ÎÒÃÇ¿ÉÒÔ¸üºÃµØÖÎÀíºÍÓÅ»¯ÏµÍ³µÄÄÚ´æʹÓã¬Ìá¸ßϵͳµÄÐÔÄܺÍÎȹÌÐÔ¡£
ÒÔÉϾÍÊÇÔõÑù½â¾öLinuxϵͳÖзºÆðµÄÀú³ÌÕ¼Óùý¶àÄÚ´æÎÊÌâµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡