1. Technology

Your suggestion is on its way!

An email with a link to:

http://linux.about.com/od/commands/l/blcmdl1_ps.htm

was emailed to:

Thanks for sharing About.com with others!

Linux / Unix Command: ps
Command Library

NAME

ps - report process status

EXAMPLES

SYNOPSIS

ps [options]

DESCRIPTION

ps gives a snapshot of the current processes. If you want a repetitive update of this status, use top. This man page documents the /proc-based version of ps, or tries to.

COMMAND-LINE OPTIONS

This version of ps accepts several kinds of options.

Unix98 options may be grouped and must be preceeded by a dash.
BSD options may be grouped and must not be used with a dash.
GNU long options are preceeded by two dashes.

Options of different types may be freely mixed.

Set the I_WANT_A_BROKEN_PS environment variable to force BSD syntax even when options are preceeded by a dash. The PS_PERSONALITY environment variable (described below) provides more detailed control of ps behavior.

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
a select all processes on a terminal, including those of other users
g really 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)
S include some dead child process data (as a sum with the parent)
ctrue command name
eshow environment after the command
fASCII-art process hierarchy (forest)
h do 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
--cumulative include 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)

SEE ALSO

top(1) pstree(1) proc(5)

STANDARDS

This ps can be set to conform to version 2 of the Single Unix Specification.


Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

See More About

©2014 About.com. All rights reserved.