×ðÁú¿­Ê±¹ÙÍøµÇ¼

linuxÔõôÉó²éÄ¿½ñÀú³ÌÏÂÁî

Éó²é linux Ä¿½ñÀú³ÌµÄÏÂÁîÓУº1. ps ÏÂÁÏÔʾÀú³ÌÐÅÏ¢ £»2. top ÏÂÁʵʱÀú³Ì¼àÊÓÆ÷ £»3. pstree ÏÂÁÒÔÊ÷ÐνṹÏÔʾÀú³Ì £»4. /proc Ŀ¼£º°üÀ¨Ã¿¸öÀú³ÌµÄÐÅÏ¢ £»5. ÆäËû¹¤¾ß£¨htop¡¢glances¡¢lnav£©¡£

ÔõÑùÉó²é Linux Ä¿½ñÀú³ÌÏÂÁî

Éó²é Linux Ä¿½ñÀú³ÌÏÂÁî³£ÓõÄÒªÁìÓУº

1. ps ÏÂÁî

ps ÏÂÁîÊÇÉó²éÀú³ÌÐÅÏ¢µÄÇ¿Ê¢¹¤¾ß¡£Æä»ù±¾Ó÷¨ÈçÏ£º

ps [-eflw]

µÇ¼ºó¸´ÖÆ

-e£ºÏÔʾËùÓÐÀú³Ì

-f£ºÏÔʾÍêÕûÃûÌõÄÐÅÏ¢

-l£ºÏÔʾ³¤Ê±¼äÃûÌõÄÐÅÏ¢

-w£º¿íÁбíģʽ

ÀýÈ磬ҪÉó²éÄ¿½ñËùÓÐÀú³Ì¼°ÆäÏÂÁ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

ps -ef

µÇ¼ºó¸´ÖÆ

2. top ÏÂÁî

top ÏÂÁîÌṩÁËÒ»¸öʵʱÀú³Ì¼àÊÓÆ÷¡£Æä»ù±¾Ó÷¨ÈçÏ£º

top

µÇ¼ºó¸´ÖÆ

top ÏÂÁîÏÔʾÖÖÖÖÐÅÏ¢£¬°üÀ¨Ã¿¸öÀú³ÌµÄÏÂÁî¡£

3. pstree ÏÂÁî

pstree ÏÂÁîÒÔÊ÷ÐνṹÏÔʾÀú³Ì¼°Æ丸Àú³Ì¡£Æä»ù±¾Ó÷¨ÈçÏ£º

pstree

µÇ¼ºó¸´ÖÆ

pstree ÏÂÁî¿É×ÊÖúÄú¿ÉÊÓ»¯Àú³ÌµÄ²ã¼¶¹Øϵ¡£

4. /proc Ŀ¼

/proc Ŀ¼°üÀ¨ÓйØϵͳÖÐÿ¸öÀú³ÌµÄÐÅÏ¢¡£ÒªÉó²éÌض¨Àú³ÌµÄÏÂÁ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

cat /proc/<pid>/cmdline</pid>

µÇ¼ºó¸´ÖÆ

ÆäÖÐ ÊÇÀú³ÌµÄÀú³Ì ID¡£

5. ÆäËû¹¤¾ß

htop£ºÒ»¸ö½»»¥Ê½Àú³ÌÉó²éÆ÷£¬ÌṩÁË±È top ÏÂÁî¸ü¸ß¼¶µÄ¹¦Ð§¡£

glances£ºÒ»¸öȫϵͳ¼àÊÓ¹¤¾ß£¬°üÀ¨Àú³ÌÐÅÏ¢¡£

lnav£ºÒ»¸öÏÂÁîÐй¤¾ß£¬ÓÃÓÚÉó²é /proc Ŀ¼ÖеÄÐÅÏ¢£¬°üÀ¨Àú³ÌÏÂÁî¡£

ÒÔÉϾÍÊÇlinuxÔõôÉó²éÄ¿½ñÀú³ÌÏÂÁîµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ