.\" Quick hack conversion by Albert Cahalan, 1998.
.\" Licensed under version 2 of the Gnu General Public License.
.\"
-.TH PS 1 2018-01-13 "procps-ng" "User Commands"
+.TH PS 1 2018-05-31 "procps-ng" "User Commands"
.\"
.\" To render this page:
.\" groff -t -b -man -X -P-resolution -P100 -Tps ps.1 &
.SH NAME
ps \- report a snapshot of the current processes.
.SH SYNOPSIS
-\fBps\fR [\fIoptions\fR]
-.PP
-.PP
+\fBps\fR [\,\fIoptions\/\fR]
.SH DESCRIPTION
.B ps
displays information about a selection of the active processes. If you want
default display and show the command args (args=COMMAND) instead of the
executable name. You can override this with the
.B PS_FORMAT
-environment variable. The use of BSD\-style options will also change the
+environment variable. The use of BSD\-style options will also change the
process selection to include processes on other terminals (TTYs) that are
owned by you; alternately, this may be described as setting the selection to
be the set of all processes filtered to exclude processes owned by other
default selection is discarded, and then the selected processes are added to
the set of processes to be displayed. A process will thus be shown if it
meets any of the given selection criteria.
-.PP
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH "EXAMPLES"
.TP 3
.B ps\ axu
.TP
To print a process tree:
-.B ps\ -ejH
+.B ps\ \-ejH
.br
.B ps\ axjf
.TP
To get info about threads:
-.B ps\ -eLf
+.B ps\ \-eLf
.br
.B ps\ axms
.TP
To get security info:
-.B ps\ -eo euser,ruser,suser,fuser,f,comm,label
+.B ps\ \-eo euser,ruser,suser,fuser,f,comm,label
.br
.B ps\ axZ
.br
-.B ps\ -eM
+.B ps\ \-eM
.TP
To see every process running as root (real\ &\ effective\ ID) in user format:
.B ps\ \-U\ root\ \-u\ root\ u
.TP
Print only the name of PID 42:
.B ps\ \-q\ 42\ \-o\ comm=
-.PP
-.PP
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH "SIMPLE PROCESS SELECTION"
.TP
-.BR a
+.B a
Lift the BSD\-style "only yourself" restriction, which is imposed upon the
set of all processes when some BSD\-style (without "\-") options are used or
when the
option.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
-.PP
.SH "PROCESS SELECTION BY LIST"
These options accept a single argument in the form of a blank\-separated or
comma\-separated list. They can be used multiple times. For example:
-\fBps\ \-p\ "1\ 2"\ \-p\ 3,4\fR
+.B ps\ \-p\ "1\ 2"\ \-p\ 3,4
.TP
.RI \- 123
-Identical to \fB\-\-pid\ \fI123\fR.
+Identical to
+.BI \-\-pid\ 123 \fR.
.TP
.I 123
-Identical to \fB\-\-pid\ \fI123\fR.
+Identical to
+.BI \-\-pid\ 123 \fR.
.TP
.BI \-C \ cmdlist
Select by command name. This selects the processes whose executable name is
.BR \-\-quick\-pid .
.TP
.BI \-q \ pidlist
-Select by PID (quick mode). This selects the processes whose process ID numbers appear in
+Select by PID (quick mode).
+This selects the processes whose process ID numbers appear in
.IR pidlist .
With this option \fBps\fR reads the necessary info only
-for the pids listed in the \fIpidlist\fR and doesn't apply
-additional filtering rules. The order of pids is unsorted
-and preserved. No additional selection options, sorting
-and forest type listings are allowed in this mode.
+for the pids listed in the
+.I pidlist
+and doesn't apply additional filtering rules.
+The order of pids is unsorted and preserved.
+No additional selection options,
+sorting and forest type listings are allowed in this mode.
Identical to
.B q
and
.BR U .
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
-.PP
.SH "OUTPUT FORMAT CONTROL"
These options are used to choose the information displayed by
.BR ps .
The output may differ by personality.
-.PP
.TP
.B \-c
Show different scheduler information for the
Display security context format (for SELinux).
.TP
.B \-f
-Do full\-format listing. This option can be combined with many other
+Do full\-format listing. This option can be combined with many other
UNIX\-style options to add additional columns. It also causes the command
arguments to be printed. When used with
.BR \-L ,
Like
.BR \-o ,
but preloaded with some default columns. Identical to
-\fB\-o\ pid,\:\fIformat\fB,\:state,\:tname,\:time,\:command\fR or
-\fB\-o\ pid,\:\fIformat\fB,\:tname,\:time,\:cmd\fR,
+.BI \-o\ pid,\: format ,\:state,\:tname,\:time,\:command
+or
+.BI \-o\ pid,\: format ,\:tname,\:time,\:cmd \fR,
see
.B \-o
below.
control
.RB ( "ps opid,\:wchan:42,\:cmd" )
is offered too. The behavior of
-.B ps -o pid=X,\:comm=Y
+.B ps \-o pid=X,\:comm=Y
varies with personality; output may be one column named "X,\:comm=Y" or two
columns named "X" and "Y". Use multiple
.B \-o
(for SELinux).
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
-.PP
.SH "OUTPUT MODIFIERS"
.\" .TP
.\" .B C
.TP
.BI k \ spec
Specify sorting order. Sorting syntax is
-[\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]].
+.RB [ + | \- ]\c
+.I key\/\c
+.RB [,[ + | \- ]\c
+.IR key [,...]].
Choose a multi\-letter key from the
.B STANDARD FORMAT SPECIFIERS
section. The "+" is optional since default direction is increasing
For sorting, obsolete BSD
.B O
option syntax is
-\fBO\fR[\fB+\fR|\fB\-\fR]\fIk1\fR[,[\fB+\fR|\fB\-\fR]\fIk2\fR[,...]].
+.BR O [ + | \- ]\c
+.IR k1 [,[\c
+.BR + | \- ]\c
+.IR k2 [,...]].
It orders the processes listing according to the multilevel sort specified by
the sequence of one\-letter short keys
-.IR k1 , k2 ", ..."
+.IR k1 , k2 ", ...\&"
described in the
.B OBSOLETE SORT KEYS
section below. The\ "+" is currently optional, merely re\-iterating the
.TP
.BI \-\-sort \ spec
Specify sorting order. Sorting syntax is
-[\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]. Choose a
-multi\-letter key from the
+.RI [ + | \- ]\c
+.IR key [,[\c
+.BR + | \- ]\c
+.IR key [,...]].
+Choose a multi\-letter key from the
.B STANDARD FORMAT SPECIFIERS
section. The "+" is optional since default direction is increasing numerical
or lexicographic order. Identical to
Set screen width.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.PD
-.PP
.SH "THREAD DISPLAY"
.TP
.B H
.B \-T
Show threads, possibly with SPID column.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.PD
-.PP
.SH "OTHER INFORMATION"
.TP
.BI \-\-help \ section
Print a help message. The section argument can be one of
-\fIs\fRimple,
-\fIl\fRist,
-\fIo\fRutput,
-\fIt\fRhreads,
-\fIm\fRisc or
-\fIa\fRll.
-The argument can be shortened to one of the underlined letters as in: s|l|o|t|m|a.
+.IR s imple,
+.IR l ist,
+.IR o utput,
+.IR t hreads,
+.IR m "isc, or"
+.IR a ll.
+The argument can be shortened to one of the underlined letters as in:
+s\^|\^l\^|\^o\^|\^t\^|\^m\^|\^a.
.TP
.B \-\-info
Print debugging info.
.B \-\-version
Print the procps-ng version.
.\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.PD
-.PP
.SH NOTES
This
.B ps
.B ps
any special permissions.
.PP
-.PP
CPU usage is currently expressed as the percentage of time spent running
during the entire lifetime of a process. This is not ideal, and\ it does not
conform to the standards that
.PP
The SIZE and RSS fields don't count some parts of a process including the
page tables, kernel stack, struct thread_info, and struct task_struct. This
-is usually at least 20 KiB of memory that is always resident. SIZE is the
+is usually at least 20\ KiB of memory that is always resident. SIZE is the
virtual size of the process (code+\:data+\:stack).
.PP
Processes marked <defunct> are dead processes (so\-called "zombies") that
if the parent process exits.
.PP
If the length of the username is greater than the length of the display
-column, the username will be truncated. See the -o and -O formatting
+column, the username will be truncated. See the \-o and \-O formatting
options to customize length.
.PP
Commands options such as
running) plus all processes owned by a user named "x". If that user
doesn't exist, then
.B ps
-will assume you really meant "\fBps\fR \fIaux\fR".
+will assume you really meant
+.RB """" ps
+.IR aux """."
.SH "PROCESS FLAGS"
The sum of these values is displayed in the "F" column,
which is provided by the
.B flags
output specifier:
-.IP
+.PP
.RS 8
.PD 0
.TP 5
used super\-user privileges
.PD
.RE
-.PP
.SH "PROCESS STATE CODES"
Here are the different values that the
-.BR s , \ stat \ and \ state
+.BR s ", " stat " and " state
output specifiers (header "STAT" or "S") will display to describe the state
of a process:
-.IP
+.PP
.RS 8
.PD 0
.TP 5
For BSD formats and when the
.B stat
keyword is used, additional characters may be displayed:
-.IP
+.PP
.RS 8
.PD 0
.TP 5
is in the foreground process group
.PD
.RE
-.PP
.SH "OBSOLETE SORT KEYS"
These keys are used by the BSD
.B O
y priority kernel scheduling priority
.\"K stime system time (conflict, system vs. start time)
.TE
-.PP
-.PP
.SH "AIX FORMAT DESCRIPTORS"
This
.B ps
and
.IR printf (3).
For example, the normal default output can be produced with this:
-\fBps \-eo "%p %y %x %c"\fR.
+.B ps \-eo """%p %y %x %c""\fR."
The
.B NORMAL
codes are described in the next section.
.TE
.SH "STANDARD FORMAT SPECIFIERS"
Here are the different keywords that may be used to control the output
-format (e.g. with option
+format (e.g., with option
.BR \-o )
or to sort the selected processes with the GNU\-style
.B \-\-sort
.PP
The following user\-defined format specifiers may contain
spaces:
-.BR args , \ cmd , \ comm , \ command , \ fname , \ ucmd , \ ucomm ,
-.BR lstart , \ bsdstart , \ start .
+.BR args ", " cmd ", " comm ", " command ", " fname ", " ucmd ", " ucomm ,
+.BR lstart ", " bsdstart ", " start .
.PP
Some keywords may not be available for sorting.
.\"
.TS
expand;
-lB1 lB1 lBw(\n[ColSize]n)
-lB1 l1 l.
+l1B l1B lBw(\n[ColSize]n)
+l1B l1 l.
CODE HEADER DESCRIPTION
%cpu %CPU T{
T}
args COMMAND T{
-command with all its arguments as a string. Modifications to the arguments
-may be shown. The output in this column may contain spaces. A process
-marked <defunct> is partly dead, waiting to be fully destroyed by its parent.
+command with all its arguments as a string.
+Modifications to the arguments may be shown.
+The output in this column may contain spaces.
+A process marked <defunct> is partly dead,
+waiting to be fully destroyed by its parent.
Sometimes the process args will be unavailable; when this happens,
.B ps
will instead print the executable name in brackets. (alias
-.BR cmd , \ command ).
+.BR cmd ", " command ).
See also the
.B comm
format keyword, the
.IR signal (7).
According to the width of the field, a 32 or 64\-bit mask in hexadecimal
format is displayed. (alias
-.BR sig_block , \ sigmask ).
+.BR sig_block ", " sigmask ).
T}
bsdstart START T{
time the command started. If the process was started less than 24 hours ago,
the output format is "\ HH:MM", else it is " Mmm:SS" (where Mmm is the three
letters of the month). See also
-.BR lstart , \ start , \ start_time ", and" \ stime .
+.BR lstart ", " start ", " start_time ", and " stime .
T}
bsdtime TIME T{
T}
c C T{
-processor utilization. Currently, this is the integer value of the percent
-usage over the lifetime of the process. (see
+processor utilization.
+Currently, this is the integer value of the percent usage over the
+lifetime of the process. (see
.BR %cpu ).
T}
.IR signal (7).
According to the width of the field, a 32 or 64 bits mask in hexadecimal
format is displayed. (alias
-.BR sig_catch , \ sigcatch ).
+.BR sig_catch ", " sigcatch ).
T}
cgname CGNAME T{
class CLS T{
scheduling class of the process. (alias
-.BR policy , \ cls ).
+.BR policy ", " cls ).
Field's possible values are:
-.IP "" 2
+.sp 1
+.in +9n
\- not reported
.br
TS SCHED_OTHER
DLN SCHED_DEADLINE
.br
? unknown value
+.in
T}
cls CLS T{
scheduling class of the process. (alias
-.BR policy , \ cls ).
+.BR policy ", " cls ).
Field's possible values are:
-.IP "" 2
+.sp 1
+.in +9n
\- not reported
.br
TS SCHED_OTHER
DLN SCHED_DEADLINE
.br
? unknown value
+.in
T}
cmd CMD T{
see
.BR args .
(alias
-.BR args , \ command ).
+.BR args ", " command ).
T}
comm COMMAND T{
will not be shown. A process marked <defunct> is partly dead, waiting to be
fully destroyed by its parent. The output in this column may contain spaces.
(alias
-.BR ucmd , \ ucomm ).
+.BR ucmd ", " ucomm ).
See also the
.B args format keyword,
the
See
.BR args .
(alias
-.BR args , \ command ).
+.BR args ", " command ).
T}
cp CP T{
and the field width permits, or a decimal representation otherwise. The
.B n
option can be used to force the decimal representation. (alias
-.BR uname , \ user ).
+.BR uname ", " user ).
T}
f F T{
flags associated with the process, see the
.B PROCESS FLAGS
section. (alias
-.BR flag , \ flags ).
+.BR flag ", " flags ).
T}
fgid FGID T{
see
.BR f .
(alias
-.BR f , \ flags ).
+.BR f ", " flags ).
T}
flags F T{
see
.BR f .
(alias
-.BR f , \ flag ).
+.BR f ", " flag ).
T}
fname COMMAND T{
.IR signal (7).
According to the width of the field, a 32 or 64 bits mask in hexadecimal
format is displayed. (alias
-.BR sig_ignore , \ sigignore ).
+.BR sig_ignore ", " sigignore ).
T}
ipcns IPCNS T{
-Unique inode number describing the namespace the process belongs to. See namespaces(7).
+Unique inode number describing the namespace the process belongs to.
+See namespaces(7).
T}
label LABEL T{
lstart STARTED T{
time the command started. See also
-.BR bsdstart , \ start , \ start_time ", and" \ stime .
+.BR bsdstart ", " start ", " start_time ", and " stime .
T}
lsession SESSION T{
lwp LWP T{
light weight process (thread) ID of the dispatchable entity (alias
-.BR spid , \ tid ).
+.BR spid ", " tid ).
See
.B tid
for additional information.
T}
mntns MNTNS T{
-Unique inode number describing the namespace the process belongs to. See namespaces(7).
+Unique inode number describing the namespace the process belongs to.
+See namespaces(7).
T}
netns NETNS T{
-Unique inode number describing the namespace the process belongs to. See namespaces(7).
+Unique inode number describing the namespace the process belongs to.
+See namespaces(7).
T}
ni NI T{
-nice value. This ranges from 19 (nicest) to \-20 (not nice to others),
+nice value.
+This ranges from 19 (nicest) to \-20 (not nice to others),
see
.IR nice (1).
(alias
T}
pending PENDING T{
-mask of the pending signals. See
+mask of the pending signals.
+See
.IR signal (7).
Signals pending on the process are distinct from signals pending on
individual threads. Use the
T}
pidns PIDNS T{
-Unique inode number describing the namespace the process belongs to. See namespaces(7).
+Unique inode number describing the namespace the process belongs to.
+See namespaces(7).
T}
pmem %MEM T{
policy POL T{
scheduling class of the process. (alias
-.BR class , \ cls ).
+.BR class ", " cls ).
Possible values are:
-.IP "" 2
+.sp 1
+.in +9n
\- not reported
.br
TS SCHED_OTHER
DLN SCHED_DEADLINE
.br
? unknown value
+.in
T}
ppid PPID T{
rss RSS T{
resident set size, the non\-swapped physical memory that a task has used (in
-kiloBytes). (alias
-.BR rssize , \ rsz ).
+kilobytes). (alias
+.BR rssize ", " rsz ).
T}
rssize RSS T{
see
.BR rss .
(alias
-.BR rss , \ rsz ).
+.BR rss ", " rsz ).
T}
rsz RSZ T{
see
.BR rss .
(alias
-.BR rss , \ rssize ).
+.BR rss ", " rssize ).
T}
rtprio RTPRIO T{
sess SESS T{
session ID or, equivalently, the process ID of the session leader. (alias
-.BR session , \ sid ).
+.BR session ", " sid ).
T}
sgi_p P T{
see
.BR sess .
(alias
-.BR sess , \ session ).
+.BR sess ", " session ).
T}
sig PENDING T{
see
.BR pending .
(alias
-.BR pending , \ sig_pend ).
+.BR pending ", " sig_pend ).
T}
sigcatch CAUGHT T{
see
.BR caught .
(alias
-.BR caught , \ sig_catch ).
+.BR caught ", " sig_catch ).
T}
sigignore IGNORED T{
see
.BR ignored .
(alias
-.BR ignored , \ sig_ignore ).
+.BR ignored ", " sig_ignore ).
T}
sigmask BLOCKED T{
see
.BR blocked .
(alias
-.BR blocked , \ sig_block ).
+.BR blocked ", " sig_block ).
T}
size SIZE T{
see
.BR lwp .
(alias
-.BR lwp , \ tid ).
+.BR lwp ", " tid ).
T}
stackp STACKP T{
time the command started. If the process was started less than 24 hours ago,
the output format is "HH:MM:SS", else it is "\ \ Mmm\ dd" (where Mmm is a
three\-letter month name). See also
-.BR lstart , \ bsdstart , \ start_time ", and" \ stime .
+.BR lstart ", " bsdstart ", " start_time ", and " stime .
T}
start_time START T{
.B ps
was invoked, or "MmmDD" if it was not started the same day, or "HH:MM"
otherwise. See also
-.BR bsdstart , \ start , \ lstart ", and" \ stime .
+.BR bsdstart ", " start ", " lstart ", and " stime .
T}
stat STAT T{
state S T{
see
-.BR s ". (alias" \ s ).
+.BR s ".\& (alias" \ s ).
T}
suid SUID T{
tid TID T{
the unique number representing a dispatchable entity (alias
-.BR lwp , \ spid ).
+.BR lwp ", " spid ).
This value may also appear as: a process ID (pid); a process group ID (pgrp);
a session ID for the session leader (sid); a thread group ID for the thread
group leader (tgid); and a tty process group ID for the process group leader
tname TTY T{
controlling tty (terminal). (alias
-.BR tt , \ tty ).
+.BR tt ", " tty ).
T}
tpgid TPGID T{
T}
trs TRS T{
-text resident set size, the amount of physical memory devoted to executable code.
+text resident set size,
+the amount of physical memory devoted to executable code.
T}
tt TT T{
controlling tty (terminal). (alias
-.BR tname , \ tty ).
+.BR tname ", " tty ).
T}
tty TT T{
controlling tty (terminal). (alias
-.BR tname , \ tt ).
+.BR tname ", " tt ).
T}
ucmd CMD T{
see
.BR comm .
(alias
-.BR comm , \ ucomm ).
+.BR comm ", " ucomm ).
T}
ucomm COMMAND T{
see
.BR comm .
(alias
-.BR comm , \ ucmd ).
+.BR comm ", " ucmd ).
T}
uid UID T{
see
.BR euser .
(alias
-.BR euser , \ user ).
+.BR euser ", " user ).
T}
unit UNIT T{
see
.BR euser .
(alias
-.BR euser , \ uname ).
+.BR euser ", " uname ).
T}
userns USERNS T{
-Unique inode number describing the namespace the process belongs to. See namespaces(7).
+Unique inode number describing the namespace the process belongs to.
+See namespaces(7).
T}
utsns UTSNS T{
-Unique inode number describing the namespace the process belongs to. See namespaces(7).
+Unique inode number describing the namespace the process belongs to.
+See namespaces(7).
T}
uunit UUNIT T{
.TE
.\" #######################################################################
-.PP
-.PP
.SH "ENVIRONMENT VARIABLES"
The following environment variables could affect
.BR ps :
Override default display height.
.TP
.B PS_PERSONALITY
-Set to one of posix, old, linux, bsd, sun, digital... (see section
+Set to one of posix, old, linux, bsd, sun, digital...\& (see section
.B PERSONALITY
below).
.TP
.B CMD_ENV
-Set to one of posix, old, linux, bsd, sun, digital... (see section
+Set to one of posix, old, linux, bsd, sun, digital...\& (see section
.B PERSONALITY
below).
.TP
Not currently supported.
.TP
.B PS_FORMAT
-Default output format override. You may set this to a format
-string of the type used for the
+Default output format override.
+You may set this to a format string of the type used for the
.B \-o
option.
The
Don't find excuses to ignore bad "features".
.TP
.B _XPG
-Cancel \fBCMD_ENV\fR=\fIirix\fR non\-standard behavior.
+Cancel
+.BR CMD_ENV =\c
+.I irix
+non\-standard behavior.
.PP
In general, it is a bad idea to set these variables. The one exception is
.B CMD_ENV
which could be set to Linux for normal systems. Without that setting,
.B ps
follows the useless and bad parts of the Unix98 standard.
-.PP
.SH "PERSONALITY"
.TS
l l.
unix95 standard
unix98 standard
.TE
-.PP
-.PP
.SH "SEE ALSO"
.BR pgrep (1),
.BR pstree (1),
.BR top (1),
.BR proc (5).
-.PP
-.PP
.SH STANDARDS
This
.B ps
.IP 5 4
ISO/IEC 9945:2003
.PD
-.PP
.SH AUTHOR
.B ps
was originally written by
-.UR lankeste@\:fwi.\:uva.\:nl
+.MT lankeste@\:fwi.\:uva.\:nl
Branko Lankester
-.UE .
-.UR johnsonm@\:redhat.\:com
-Michael K. Johnson
-.UE
+.ME .
+.MT johnsonm@\:redhat.\:com
+Michael K.\& Johnson
+.ME
re\-wrote it significantly to use the proc filesystem, changing a few things
in the process.
-.UR mjshield@\:nyx.\:cs.\:du.\:edu
+.MT mjshield@\:nyx.\:cs.\:du.\:edu
Michael Shields
-.UE
+.ME
added the pid\-list feature.
-.UR cblake@\:bbn.\:com
+.MT cblake@\:bbn.\:com
Charles Blake
-.UE
+.ME
added multi\-level sorting, the dirent\-style library, the device
name\-to\-number mmaped database, the approximate binary search directly on
System.map, and many code and documentation cleanups. David Mossberger\-Tang
wrote the generic BFD support for psupdate.
-.UR albert@\:users.\:sf.\:net
+.MT albert@\:users.\:sf.\:net
Albert Cahalan
-.UE
+.ME
rewrote ps for full Unix98 and BSD support, along with some ugly hacks for
obsolete and foreign syntax.
.PP
Please send bug reports to
-.UR procps@\:freelists.\:org
-.UE .
+.MT procps@\:freelists.\:org
+.ME .
No subscription is required or suggested.