linux中ps命令

时间:2023-03-08 20:11:04

ps的参数 -C的使用

[root@centos7 ~]# ps -C nginx -o user,pid,comm
USER PID COMMAND
root 2697 nginx
nginx 2698 nginx
nginx 2699 nginx
[root@centos7 ~]# ps aux|grep nginx
root 2697 0.0 0.1 45944 1136 ? Ss 18:02 0:00 nginx: master process nginx
nginx 2698 0.0 0.1 48484 1980 ? S 18:02 0:00 nginx: worker process
nginx 2699 0.0 0.1 48484 1980 ? S 18:02 0:00 nginx: worker process
root 2702 0.0 0.0 112624 680 pts/0 R+ 18:02 0:00 grep --color=auto nginx