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]
  • 相关阅读:
    wpf Behavior
    wpf Trigger
    语法糖
    Lambda 表达式
    wpf 3D动画
    IEnumerable接口学习
    Delegates, Events, and Anonymous Methods 委托、事件与匿名方法
    wpf 平滑效果随记
    软件工程第一篇博客
    记考研高数第一课
  • 原文地址:https://www.cnblogs.com/rusking/p/5623669.html
Copyright © 2011-2022 走看看