Jun 1

Ps       Linux and Unix 命令手册 性能监控部分 不指定

xieyy , 16:14 , Linux系统与应用 , 评论(0) , 引用(0) , 阅读(2001) , Via 本站原创 | |
Ps       Linux and Unix 命令手册 性能监控部分
本命令手册以实用,简洁为原则,对于已经消化的内容,不附加详细的注解。

功能
报告进程信息

常用用法
# ps aux

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND

root         1  0.0  0.0  1388  504 ?        S    May04   0:07 init [3]      

root         2  0.0  0.0     0    0 ?        SW   May04   0:00 [keventd]

root         3  0.0  0.0     0    0 ?        SW   May04   0:00 [kapmd]

root         4  0.0  0.0     0    0 ?        SWN  May04   0:00 [ksoftirqd_CPU0]

root         5  0.0  0.0     0    0 ?        SW   May04   0:00 [kswapd]

root         6  0.0  0.0     0    0 ?        SW   May04   0:00 [bdflush]

root         7  0.0  0.0     0    0 ?        SW   May04   0:00 [kupdated]

root         8  0.0  0.0     0    0 ?        SW<  May04   0:00 [mdrecoveryd]

root        12  0.0  0.0     0    0 ?        SW   May04   0:00 [kjournald]

root        64  0.0  0.0     0    0 ?        SW   May04   0:00 [khubd]

root      3710  0.0  0.0  1380  460 ttyS0    S    May04   0:00 /sbin/agetty -L 19200 ttyS0


可以查看到进程的启动时间。

-o可以自定义格式:

比如:

# ps afx -o pid,args,etime,stime  

  PID COMMAND              ELAPSED STIME

    1 init [3]         23-03:27:18 May04

    2 [keventd]        23-03:27:17 May04

    3 [kapmd]          23-03:27:17 May04

    4 [ksoftirqd_CPU0] 23-03:27:17 May04

    5 [kswapd]         23-03:27:17 May04

    6 [bdflush]        23-03:27:17 May04

    7 [kupdated]       23-03:27:17 May04

    8 [mdrecoveryd]    23-03:27:10 May04

   12 [kjournald]      23-03:27:10 May04

以上转自:http://blog.chinaunix.net/u/21908/showart.php?id=707939
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]