linuxÉó²éÀú³ÌÖ´ÐÐÇéÐÎ
ʹÓà top ÏÂÁî¿ÉÒÔÉó²é linux ÖÐÀú³ÌÖ´ÐÐÇéÐΣ¬ËüʵʱÏÔʾËùÓÐÀú³ÌµÄ×ÊԴʹÓÃÇéÐΡ£ÏêϸÐÅÏ¢¿Éͨ¹ý -p Ñ¡ÏîÉó²éÌض¨Àú³Ì£¬Èç cpu ʹÓÃÂÊ¡¢ÄÚ´æÕ¼Óõȡ£ÆäËû¹¤¾ß°üÀ¨ ps¡¢pstree ºÍ strace£¬ÓÃÓÚÉó²éÀú³Ì״̬¡¢½¨ÉèÀú³ÌÊ÷ºÍ¸ú×ÙϵͳŲÓá£
Linux Éó²éÀú³ÌÖ´ÐÐÇéÐÎ
ÔÚ Linux ϵͳÖУ¬ÓжàÖÖ¹¤¾ß¿ÉÒÔÓÃÀ´Éó²éÕýÔÚÔËÐеÄÀú³Ì¼°ÆäÖ´ÐÐÇéÐΡ£×î³£ÓõŤ¾ßÖ®Ò»ÊÇ top ÏÂÁî¡£
ʹÓà top ÏÂÁîÉó²éÀú³Ì
top ÏÂÁî¿ÉÒÔʵʱÏÔʾËùÓÐÕýÔÚÔËÐеÄÀú³Ì¼°Æä×ÊԴʹÓÃÇéÐΡ£ÒªÊ¹ÓôËÏÂÁֻÐèÔÚÖÕ¶ËÖÐÊäÈë top ¼´¿É¡£
top ÏÂÁîµÄÊä³öÚ¹ÊÍ
top ÏÂÁîµÄÊä³ö·ÖΪ¶à¸ö²¿·Ö£º
Àú³ÌÁÐ±í£ºÁгöÁËËùÓÐÕýÔÚÔËÐеÄÀú³Ì£¬Æ¾Ö¤ CPU ʹÓÃÂÊÅÅÐò¡£
ͳ¼ÆÐÅÏ¢£ºÏÔʾϵͳµÄ×Ü CPU ʹÓÃÂÊ¡¢ÄÚ´æʹÓÃÂÊ¡¢½»Á÷¿Õ¼äʹÓÃÂʺÍÆäËûͳ¼ÆÐÅÏ¢¡£
ÏÂÁîÐУºÏÔʾÕýÔÚÔËÐÐÀú³ÌµÄÏÂÁîÐС£
Éó²éÌض¨Àú³ÌµÄÏêϸÐÅÏ¢
ÒªÉó²éÌض¨Àú³ÌµÄÏêϸÐÅÏ¢£¬ÇëÔÚ top ÏÂÁîÖÐʹÓà -p Ñ¡Ïî¡£ÀýÈ磬ҪÉó²éÀú³Ì ID Ϊ 1234 µÄÀú³Ì£¬ÇëʹÓÃÒÔÏÂÏÂÁ
top -p 1234
µÇ¼ºó¸´ÖÆ
Õ⽫ÏÔʾÓйظÃÀú³ÌµÄÏêϸÐÅÏ¢£¬°üÀ¨ CPU ʹÓÃÂÊ¡¢ÄÚ´æÕ¼Óá¢Ïß³ÌÊýºÍÆäËûÐÅÏ¢¡£
ÆäËûÉó²éÀú³ÌµÄ¹¤¾ß
³ýÁË top ÏÂÁîÖ®Í⣬ÉÐÓÐÆäËûһЩ¹¤¾ß¿ÉÒÔÓÃÀ´Éó²éÀú³ÌÖ´ÐÐÇéÐΣ¬ÀýÈ磺
ps ÏÂÁÌṩÓйØÀú³Ì״̬¡¢Àú³Ì ID¡¢Óû§¡¢CPU ʹÓÃÂʺÍÄÚ´æʹÓÃÂʵÄÐÅÏ¢¡£
pstree ÏÂÁÒÔÊ÷×´½á¹¹ÏÔʾÀú³Ì¼°Æä×ÓÀú³Ì¡£
strace ÏÂÁ¸ú×ÙÀú³ÌµÄϵͳŲÓúÍÐźš£
ͨ¹ýʹÓÃÕâЩ¹¤¾ß£¬Äã¿ÉÒÔ¼à¿ØÕýÔÚÔËÐеÄÀú³Ì£¬ÕÒ³öÐÔÄÜÆ¿¾±£¬²¢Õï¶ÏÎÊÌâ¡£
ÒÔÉϾÍÊÇlinuxÉó²éÀú³ÌÖ´ÐÐÇéÐεÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡