Éó²élinuxÀú³ÌÔËÐÐʱ¼ä
ÒªÉó²é linux Àú³ÌÔËÐÐʱ¼ä£¬¿ÉÒÔʹÓà “ps aux | grep ” ÏÂÁî¡£ÏÂÁîÊä³öµÄµÚ 8 ÁÐ (“time”) ÒÔ “hh:mm:ss” ÃûÌÃÏÔʾÀú³ÌÔËÐÐʱ¼ä¡£
Éó²é Linux Àú³ÌÔËÐÐʱ¼ä
ÔõÑùÉó²éÀú³ÌÔËÐÐʱ¼ä£¿
ÒªÉó²é Linux Àú³ÌÔËÐÐʱ¼ä£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
ps aux | grep <process_name></process_name>
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬ ÊÇÒªÉó²éµÄÀú³ÌÃû³Æ¡£
Ч¹û½â¶Á
ÏÂÁîÊä³ö½«ÏÔʾËùÓÐÕýÔÚÔËÐеÄÀú³ÌÐÅÏ¢¡£Òª²éÕÒÌض¨Àú³Ì£¬ÇëʹÓà grep ÏÂÁî¹ýÂËÊä³ö¡£
Ч¹ûÖÐµÄµÚ 8 ÁÐ (“TIME”) ÌåÏÖÀú³ÌÔËÐеÄʱ¼ä£¬ÃûÌÃΪ “HH:MM:SS”¡£ÀýÈ磬”00:01:23” ÌåÏÖÀú³ÌÒÑÔËÐÐ 1 Сʱ 1 ·ÖÖÓ 23 Ãë¡£
ʾÀý
ÒªÉó²éÃû½Ð “apache2” µÄÀú³ÌÔËÐÐʱ¼ä£¬¿ÉÒÔÊäÈëÒÔÏÂÏÂÁ
ps aux | grep apache2
µÇ¼ºó¸´ÖÆ
Êä³ö¿ÉÄÜÈçÏÂËùʾ£º
root 1234 0.0 0.1 101320 7228 ? Sl 17:32 0:01:23 /usr/sbin/apache2 -k start
µÇ¼ºó¸´ÖÆ
ƾ֤Êä³ö£¬Àú³Ì “apache2” ÒÑÔËÐÐ 1 Сʱ 1 ·ÖÖÓ 23 Ãë¡£
ÒÔÉϾÍÊÇÉó²élinuxÀú³ÌÔËÐÐʱ¼äµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡