分类:
2010-03-01 15:07:36
http://www.ibm.com/developerworks/cn/aix/library/0909_unixcpu_wangwh/index.html
1.使用 ps 选出占用 CPU 时间最多的五个进程
#ps -e -o pcpu,pid,user,sgi_p,cmd |grep -v PID| sort -k 1| tail -5
[root@host67 ~]# ps -e -o pcpu,pid,user,sgi_p,cmd |grep -v PID| sort -k 1| tail -5
0.0 67 root * [cqueue/0]
0.0 6 root * [khelper]
0.0 70 root * [khubd]
0.0 72 root * [kseriod]
0.0 7 root * [kthread]
2.
# ps -C nfsd -o cmd,pCPU,start_time,user,ppid,size,stat
CMD %CPU START USER PPID SZ STAT
[nfsd] 0.0 May12 root 1 0 D
[nfsd] 0.0 May12 root 1 0 D
[nfsd] 0.0 May12 root 1 0 D
[nfsd] 0.0 May12 root 1 0 D
[nfsd] 0.0 May12 root 1 0 S
[nfsd] 0.0 May12 root 1 0 S
[nfsd] 0.0 May12 root 1 0 D
[nfsd] 0.0 May12 root 1 0 D