개발

[Linux / Unix] ps

팥빙구 2015. 3. 6. 14:29

Report process status

SIMPLE PROCESS SELECTION

SwitchDescription
-Aselect all processes
-Nnegate selection
-aselect all with a tty except session leaders
-dselect all, but omit session leaders
-eselect all processes
Tselect all processes on this terminal
aselect all processes on a terminal, including those of other users 
greally all, even group leaders (does nothing w/o SunOS settings) 
rrestrict output to running processes
xselect processes without controlling ttys
--deselectnegate selection

PROCESS SELECTION BY LIST

SwitchDescription
-Cselect by command name
-Gselect by RGID (supports names)
-Uselect by RUID (supports names)
-gselect by session leader OR by group name
-pselect by PID
-sselect processes belonging to the sessions given
-tselect by tty
-uselect by effective user ID (supports names)
Uselect processes for specified users
pselect by process ID
tselect by tty
--Groupselect by real group name or ID
--Userselect by real user name or ID
--groupselect by effective group name or ID
--pidselect by process ID
--sidselect by session ID
--ttyselect by terminal
--userselect by effective user name or ID
-123implied --sid
123implied --pid

OUTPUT FORMAT CONTROL

SwitchDescription
-Ois preloaded "-o"
-cdifferent scheduler info for -l option
-fdoes full listing
-jjobs format
-llong format
-ouser-defined format
-ydo not show flags; show rss in place of addr
Ois preloaded "o" (overloaded)
Xold Linux i386 register format
jjob control format
ldisplay long format
ospecify user-defined format
sdisplay signal format
udisplay user-oriented format
vdisplay virtual memory format
--formatuser-defined format

OUTPUT MODIFIERS

SwitchDescription
-Hshow process hierarchy (forest)
-mshow all threads
-nset namelist file
-wwide output
Cuse raw CPU time for %CPU instead of decaying average
Nspecify namelist file
Osorting order (overloaded)
Sinclude some dead child process data (as a sum with the parent) 
ctrue command name
eshow environment after the command
fASCII-art process hierarchy (forest)
hdo not print header lines (repeat header lines in BSD personality) 
mall threads
nnumeric output for WCHAN and USER
wwide output
--colsset screen width
--columnsset screen width
--cumulativeinclude some dead child process data (as a sum with the parent) 
--forestASCII art process tree
--htmlHTML escaped output
--headersrepeat header lines
--no-headersprint no header line at all
--linesset screen height
--nulunjustified output with NULs
--nullunjustified output with NULs
--rowsset screen height
--sortspecify sorting order
--widthset screen width
--zerounjustified output with NULs

INFORMATION

SwitchDescription
-Vprint version
Llist all format specifiers
Vshow version info
--helpprint help message
--infoprint debugging info
--versionprint version

OBSOLETE

SwitchDescription
Aincrease the argument space (DecUnix)
Muse alternate core (try -n or N instead)
Wget swap info from ... not /dev/drum (try -n or N instead)
kuse /vmcore as c-dumpfile (try -n or N instead)