ps命令的输出格式可以通过-o参数定制,可以使用如下命令显示进程所对应的执行CPU:
# ps -eo pid,args,psr参数的含义:pid - 进程IDargs - 该进程执行时传入的命令行参数psr - 分配给进程的CPU有关ps命令的其它信息请查阅ps手册:# man ps示例:[root@www ~]# ps -eo pid,args,psr.............20965 /usr/local/php-fcgi/bin/php 121683 /bin/sh /usr/local/ddos/ddo 121684 sleep 600 321746 /sbin/udevd -d 221832 /bin/sh /usr/local/ddos/ddo 121833 sleep 600 021865 sshd: root@pts/0 321873 -bash 121927 ps -eo pid,args,psr 123520 [pdflush] 323744 nginx: master process /usr/ 123745 nginx: worker process 323749 nginx: worker process 323753 nginx: worker process 323755 nginx: worker process 3
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
ps -eo euser,ruser,suser,fuser,f,comm,label man 了下.好强大啊.