zoukankan      html  css  js  c++  java
  • 几个常用的ps命令

    1. ps aux

    If you are looking for a short summary of the active processes, use  ps aux

    [root@rhel7 tmp]# ps aux |head
    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    root         1  0.0  0.3  44496  7124 ?        Ss   Jun27   0:01 /usr/lib/systemd/systemd --switched-root --system --deserialize 21
    root         2  0.0  0.0      0     0 ?        S    Jun27   0:00 [kthreadd]
    root         3  0.0  0.0      0     0 ?        S    Jun27   0:00 [ksoftirqd/0]
    root         7  0.0  0.0      0     0 ?        S    Jun27   0:00 [migration/0]
    root         8  0.0  0.0      0     0 ?        S    Jun27   0:00 [rcu_bh]
    root         9  0.0  0.0      0     0 ?        S    Jun27   0:00 [rcuob/0]
    root        10  0.0  0.0      0     0 ?        R    Jun27   0:00 [rcu_sched]
    root        11  0.0  0.0      0     0 ?        S    Jun27   0:00 [rcuos/0]
    root        12  0.0  0.0      0     0 ?        S    Jun27   0:00 [watchdog/0]

    2. ps -ef 

    If you are not only looking for the name of the process but also for the exact command that was used to start the process, use ps -ef .

    [root@rhel7 tmp]# ps -ef |head
    UID        PID  PPID  C STIME TTY          TIME CMD
    root         1     0  0 Jun27 ?        00:00:01 /usr/lib/systemd/systemd --switched-root --system --deserialize 21
    root         2     0  0 Jun27 ?        00:00:00 [kthreadd]
    root         3     2  0 Jun27 ?        00:00:00 [ksoftirqd/0]
    root         7     2  0 Jun27 ?        00:00:00 [migration/0]
    root         8     2  0 Jun27 ?        00:00:00 [rcu_bh]
    root         9     2  0 Jun27 ?        00:00:00 [rcuob/0]
    root        10     2  0 Jun27 ?        00:00:00 [rcu_sched]
    root        11     2  0 Jun27 ?        00:00:00 [rcuos/0]
    root        12     2  0 Jun27 ?        00:00:00 [watchdog/0]

    3.ps fax 

    which shows hierarchical relationships between parent and child processes.

    [root@rhel7 tmp]# ps fax | head
      PID TTY      STAT   TIME COMMAND
        2 ?        S      0:00 [kthreadd]
        3 ?        S      0:00  \_ [ksoftirqd/0]
        7 ?        S      0:00  \_ [migration/0]
        8 ?        S      0:00  \_ [rcu_bh]
        9 ?        S      0:00  \_ [rcuob/0]
       10 ?        R      0:00  \_ [rcu_sched]
       11 ?        S      0:00  \_ [rcuos/0]
       12 ?        S      0:00  \_ [watchdog/0]
       13 ?        S<     0:00  \_ [khelper]
  • 相关阅读:
    InfoPath开发误区
    error: 80040111
    EasyUi通过POI 实现导出xls表格功能
    webservice入门
    CXF框架入门(重点)
    Spring整合Shiro
    EasyUi通过OCUpload上传及POI上传 实现导入xls表格功能
    Matlab自定义安装
    一位大学教师对学生的建议:如何做好研究
    What is covariate(协变量)
  • 原文地址:https://www.cnblogs.com/rusking/p/5623669.html
Copyright © 2011-2022 走看看