# # Difference LINUX under the most detailed and ps -ef ps aux and format Detailed

Both are used to display the specified process information but also slightly different,

1 ps -ef

ps -ef process is a standard format, it returns the following results:

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0  2019 ?        00:00:38 /usr/lib/systemd/systemd --switched-root --system --deseria
root         2     0  0  2019 ?        00:00:00 [kthreadd]
root         4     2  0  2019 ?        00:00:00 [kworker/0:0H]
root         6     2  0  2019 ?        00:02:23 [ksoftirqd/0]
root         7     2  0  2019 ?        00:00:00 [migration/0]
root         8     2  0  2019 ?        00:00:00 [rcu_bh]
root         9     2  0  2019 ?        00:10:31 [rcu_sched]
root        10     2  0  2019 ?        00:00:00 [lru-add-drain]
root        11     2  0  2019 ?        00:00:18 [watchdog/0]
...

Wherein the meaning of each column as follows:

Column Name meaning
UID User ID, but the output is the user name
PID Process ID
PPID The parent process ID
C Process CPU percentage of
ESTIMATES The time now to start the process
TTY The process running on the terminal, if nothing to do with the terminal, the display? If it is pts / 0, etc., is represented by a network connection to the host process.
CMD Name and parameters of the command

2 ps aux

ps aux BSD format is displayed, it returns the following results:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  43532  3748 ?        Ss    2019   0:38 /usr/lib/systemd/systemd --switched-root -
root         2  0.0  0.0      0     0 ?        S     2019   0:00 [kthreadd]
root         4  0.0  0.0      0     0 ?        S<    2019   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S     2019   2:23 [ksoftirqd/0]
root         7  0.0  0.0      0     0 ?        S     2019   0:00 [migration/0]
root         8  0.0  0.0      0     0 ?        S     2019   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        R     2019  10:31 [rcu_sched]
root        10  0.0  0.0      0     0 ?        S<    2019   0:00 [lru-add-drain]
root        11  0.0  0.0      0     0 ?        S     2019   0:18 [watchdog/0]
...

Wherein the meaning of each column as follows:

Column Name meaning
USER username
%CPU CPU percentage occupied by the process
%MEM The percentage of occupied memory
VSZ Amount of virtual memory (KB) used by this process
RSS A fixed amount of memory (KB) consumed by this process (the number of pages that reside)
STAT Status of the process
START The process is triggered start time
TIME The actual process of using the CPU running time

STAT state where the common position of the status characters are:

Field meaning
D Not interrupt sleep (usually IO process)
R Running can be had in the queue line;
S In a dormant state;
T / Stops or track;
W Into the memory swap (invalid from the beginning of a kernel 2.6)
X Dead process (basic rare)
FROM Zombie process
< High-priority process
N // lower priority process
L Some pages are locked into memory;
s / Process leaders (there are child processes under it);
l Multi-threaded, the thread cloning (using CLONE_THREAD, similar NPTL pthreads);
+ In the background process group
Published 59 original articles · won praise 2 · Views 4708

Guess you like

Origin blog.csdn.net/lch551218/article/details/104232559