1. Description
Report a snapshot of the current processes.
PS [Options]
2. Common options
①L long format output;
②U displays processes in the username and start time order;
③J. display processes in the task format;
④F process is displayed in a tree format;
⑤A/e displays all processes of all users (including other users );
⑥X displays the process of the uncontrolled terminal;
7.R: displays running processes;
BytesWW to avoid detailed parameter truncation;
Explanation of execution results
①Owner of the user process;
②PID process ID;
③Ppid parent process;
④% Percentage of CPU used by CPU processes;
⑤% Mem memory usage percentage;
⑥Nice value of the Ni process. The value is large, indicating that the CPU time is less occupied;
7.Virtual size of vsz process;
BytesNumber of pages in RSS resident;
BytesWchan
BytesTty terminal ID
11Stat Process status
A.D uninterruptible sleep (usually Io)
B.R is running and can be crossed in the queue;
C.S is in sleep state;
D.T stop or be tracked;
E.W enters the memory switch (it is invalid from kernel 2.6 );
F.X dead processes (never seen );
G.Z botnets;
H.N processes with lower priority
I.L some pages are locked into the memory;
J.S process leader (with sub-processes under it );
K.L is multi-threaded (using clone_thread, like nptl pthreads do)
L.+ Process group in the background;
①Wchan Waiting process resources;
②The start time of the process;
③Time CPU consumption time of processes;
④Command name and parameters;
3. Example
PS aux
PS-auxf
Reference
[1]Http://linux.die.net/man/1/ps
Http://www.linuxsir.org/main/node/210