码迷,mamicode.com
首页 > 其他好文 > 详细

grep 或条件

时间:2017-12-01 23:28:20      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:条件   /usr   ash   gre   内存   com   nta   cpu   内存占用   

[root@node2 nginx]# ps -ef|grep -e nginx -e PID
UID         PID   PPID  C STIME TTY          TIME CMD
root       5399      1  0 04:40 ?        00:00:00 nginx: master process ./nginx
nobody    11750   5399  0 05:49 ?        00:00:00 nginx: worker process
root      11781  11696  0 06:16 pts/0    00:00:00 grep -e nginx -e PID
[root@node2 nginx]# ps -aux|grep -e nginx -e %
Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root       5399  0.0  0.0  23980  1324 ?        Ss   04:40   0:00 nginx: master process ./nginx
nobody    11750  0.0  0.0  24400  1624 ?        S    05:49   0:00 nginx: worker process
root      11783  0.0  0.0 103324   864 pts/0    S+   06:16   0:00 grep -e nginx -e %

 同时,ps -ef可以看父进程ID  PPID  以及完整的command命令 CMD

    ps -aux 可以看进程的CPU占用率和内存占用率

grep 或条件

标签:条件   /usr   ash   gre   内存   com   nta   cpu   内存占用   

原文地址:http://www.cnblogs.com/jycjy/p/7944664.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!