zoukankan      html  css  js  c++  java
  • Linux ps同时查找多个进程

    1、显示当前所有进程

    SDCxM-SDCAM-root-root> ps aux
    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    root         1     0.0     0.0       2848   604 ?          Ss     00:00     0:02 init
    root         2     0.0     0.0          0     0     ?          S      00:00     0:00 [kthreadd]
    root         3     0.0     0.0          0     0     ?          S      00:00     0:02 [ksoftirqd/0]
    root         4     0.0     0.0          0     0     ?          S      00:00     0:00 [kworker/0:0]
    root         5     0.0     0.0          0     0     ?          S      00:00     0:00 [kworker/u:0]
    root         6     0.0     0.0          0     0     ?          S      00:00     0:00 [posixcputmr/0]
    root         7     0.0     0.0          0     0     ?          S      00:00     0:00 [migration/0]

    2、同时查找多个进程,例如 kthreadd 和 migration/0 进程   

    SDCxM-SDCAM-root-root> ps aux | grep -E 'kthreadd|migration/0'    //查找多个字符串的匹配(grep -E相当于egrep)
    root         2  0.0  0.0      0     0 ?        S    00:00   0:00 [kthreadd]
    root         7  0.0  0.0      0     0 ?        S    00:00   0:00 [migration/0]
    root      6031  0.0  0.0   2856   404 pts/0    S+   04:20   0:00 grep -E kthreadd|migration/0
    SDCxM-SDCAM-root-root>

  • 相关阅读:
    vb.net 数组参与SQL语句的查询范例
    JQUERY范例
    DOS批处理释义
    GridVIew单元格合并
    [无关] 胡言乱语3
    [数据] ZZ 数据分析这点事
    [ZZ] Big Data 开源工具
    [python] ZZ 时间相关
    python 获取时间代码
    javascript基础之我见(1)深度理解原型链
  • 原文地址:https://www.cnblogs.com/followyourdream/p/3253466.html
Copyright © 2011-2022 走看看