Flag | Usage |
---|---|
-a | select all processes except both session leaders and processes not associated with a terminal |
a | lift the BSD-style "only yourself" restriction. Select all processes with a terminal. Select all processes when used with x |
-A or -e | select All processes |
-C commandList | select processes whose executable name is given in commandList |
f | forest : ASCII-art process hierarchy |
-f | full-format listing |
-F | extended full-format listing. Implies -f |
l | display BSD long format |
-L | Show Lthreads, possibly with LWP and NLWP columns |
o formatSpecString -o formatSpecString --format formatSpecString |
introduces the output formatting options |
-O formatSpecString (uppercase "o") |
same as -o but preloaded with some default columns. Identical to -o pid,format,state,tname,time,command |
p pidlist -p pidlist --pid pidlist |
select by PID |
--ppid n | select processes which parent process ID is n |
U userId -u userId --user userId |
select processed owned by userId (user name orUID) |
Z | Add a column of security data. Identical to -M (for SELinux) |
ps may display the user's uid instead of the user's name if the username is longer than 7 characters.
Flag | Usage |
---|---|
args | displays the command that is executing, with all its arguments |
comm | displays the name of the command that is executing (the binary ?) |
etime | elapsed time since the process was started : [[dd-]hh:]mm:ss |
lstart | Date + time the process was started : Fri Aug 21 23:32:21 2015. |
lwp | ID of the light weight process (thread) |
nlwp thcount | number of light weight processes (threads) |
pcpu %cpu | ratio : cputime of the process / realtime |
pid | PID of the selected process |
ppid | PID of the parent of the selected process |
pmem %mem | ratio : RSS / physical memory |
rss rssize rsz | resident set size : the non-swapped physical memory that a task has used, in kiloBytes (details : 1, 2) |
sgi_p | ID of the processor currently executing the process. Will display * if the process is not currently being executed |
start | If the process was started less than 24 hours ago, display its start time in 24h:mm:ss format. Otherwise, display the start date formatted like Aug 21. |
start_time | If the process was started today, display its start time in 24h:mm format. Otherwise, display the start date formatted like Aug21. |
state | State of the process : Running, Sleeping, Zombie, ... |
user euser uname | name of the user owning the process |
vsize vsz | virtual memory (=SWAP) size of the specified process, in KiB (needs details) |
If the custom value is empty, no header is displayed, which is convenient to output process names only : ps -o comm=
Zombie processes are already dead, so they can't be killed. They are the consequence of malfunction (or programming defect) in they parent processes. Here is how processes die :
wait()
. During that time, the child process is a zombie.wait()
, cleaning up its own zombie children.