SYNOPSIS
ps [-aAcdefjlLPRy] [-o property[=[title]], ...] ...
[-gGpstuU criteria, ...] ... [-r sysname]
DESCRIPTION
Ps prints certain indicia about active processes. If no options are
specified, all processes on the current terminal are selected;
/usr/5bin/posix/ps and /usr/5bin/posix2001/ps further restrict this to
processes owned by the invoking user. The selection can be changed by
adding criteria with the options below; when a process satifies any
criterion, it is selected. A criteria string can consist of multiple
criteria separated by blanks or commas.
By default, ps prints the process id, controlling terminal device, cu-
mulative execution time and command of processes.
The ps command accepts the following options:
-a Selects all processes with a controlling terminal device,
except for session leaders.
-c Adds scheduling class and priority to the output. This is
the default with /usr/5bin/s42/ps. See below for the mean-
ing of columns.
-d Selects all processes except session leaders.
-e Selects all processes.
-f Full listing; adds user name, parent process id, processor
utilization, and the time when the process was started.
See below for the meaning of columns.
-g pgrplist For /usr/5bin/ps and /usr/5bin/s42/ps, all processes that
belong to one of the process groups ids in pgrplist are se-
lected; for /usr/5bin/posix/ps and /usr/5bin/posix2001/ps,
all processes that belong to one of the session ids in
group.
-j Adds process group id and session id to the output. See
below for the meaning of columns.
-l Long listing; adds process flags, process state, numeric
user id, parent process id, processor utilization, priori-
ty, nice value, core address, memory size in pages and the
event waited for. See below for the meaning of columns.
-p pidlist Selects all processes with one of the given process ids.
-r sysname Change the root directory to sysname, which may be either
an absolute pathname or the basename component of a mounted
file system. Requires presence of a selection criterion.
-A Selects all processes.
-G gidlist Selects all processes that have one of the specified real
group ids, which may be symbolic or numeric.
-o property[=[title]],...
The output is changed to reflect the named property. Mul-
tiple properties can be given, separated by blanks or com-
mas; it is also possible to specify multiple -o options.
Normally, the default property description is written in
the first output line. If the = character is present, but
the title is missing in all format specifications, no de-
scriptions are printed; if a title is given, it is used in-
stead of the default. See below for valid property
strings.
-U uidlist Selects all processes with one of the given real user ids,
which may be symbolic or numeric.
The following options are extensions:
-L Prints information on lightweight processes (LWPs); adds
lightweight process id, lightweight process time, and, if
-f is also present, the number of lightweight processes.
See below for the meaning of columns.
-P Prints the processor on which the process is currently run-
ning. Disables printing of flags and memory address.
-R Resource usage format; prints process id, memory and resi-
dent set size, buffer reads and writes, messages sent and
received, user and system time, and command. See below for
the meaning of columns.
-y Modifies the -l output format; process flags, address and
size in pages are omitted, and resident set size and memory
size in kilobytes are printed instead.
The meaning of columns and column headings for the -c, -f, -j, -l and
-P options are as follows (the letters given in parentheses specify
which option causes the column to appear; all means that the column is
always printed):
l2 l2 l s s l2 l2 l2 l4 l. F (l) T{ Flags associated with the
process (octal and additive): T} 01 in core;
02 system process; 04 T{ locked in
core (e.g. for physical I/O); T} 10 being swapped;
20 being traced by another process. l2 l2 l s s l2 l2
l2 l4 l. S (l) The state of the process: O run-
ning on a processor; R runnable (on run queue);
PRI (c,l) T{ Priority. With -l, high numbers mean low priority.
With -c, high numbers mean high priority; time-sharing processes have
priorities below 60; for real-time processes, the priority is computed
as 100 + scheduling priority. T} NI (l) Nice value, used in priori-
ty computation. ADDR (l) The core address of the process.
RSS (ly) T{ The amount of memory in kilobytes currently present in
core. T} SZ (l,R) T{ The size in pages of the core image of the
process. If the -y option is also given, the size is printed in kilo-
bytes. T} MRSZ (R) T{ The amount of memory in pages currently present
in core. T} PFLTS (R) T{ The number of major page faults that
have occurred with the process. T} BUFR (R) T{ Buffer reads performed
on behalf of the process. T} BUFW (R) T{ Buffer writes performed on
behalf of the process. T} MRCV (R) T{ Messages received by the
process. T} MSND (R) T{ Messages sent by the process. T}
WCHAN (l) T{ The event for which the process is waiting or sleep-
ing; if blank, the process is running. T} STIME (f) The time when
the process was started. TTY (all) T{ The controlling tty
for the process. T} TIME (all) T{ The cumulative execution time
for the process. T} LTIME (L) T{ The cumulative execution time
for the lightweight process. T} UTIME (R) T{ The cumulative time
the process spent in user mode. T} KTIME (R) T{ The cumulative
time the process spent in system (kernel) mode. T} COMD (all) T{
The command name; with the -f option, the command line. The heading
`CMD' is printed for /usr/5bin/posix/ps and /usr/5bin/posix2001/ps; the
heading `COMMAND' is printed if the SYSV3 environment variable is set
and the -l option is not present. T}
A process that has exited and has a parent, but has not yet been waited
for by the parent is marked <defunct>.
For the -o option, the following properties (listed with their default
column headings) can be given:
l2fB l2 l. user USER Effective user name. ruser RUSER Real
user name. group GROUP Effective group name.
rgroup RGROUP Real group name. pid PID Process id.
ppid PPID Parent process id. pgid PGID Process group id.
sid SID Session id. class CLASS Scheduling class.
pcpu %CPU Processor usage in percent. vsz VSZ Memory usage in kilo-
bytes. nice NI Nice value. etime ELAPSED Time elapsed since
the process was started. time TIME Cumulative execution time.
tty TTY Controlling terminal device. comm COMMAND The first com-
mand line argument. args COMMAND Command line arguments separated by
spaces. f F Process flags. s S Process state.
c C Processor utilization for scheduling. uid UID Numeric ef-
fective user id. ruid RUID Numeric real user id. gid GID Numeric
effective group id. rgid RGID Numeric real group id. pri PRI Prior-
ity; high numbers mean high priority. opri PRI Priority; high numbers
mean low priority. psr PSR Processor. addr ADDR Core address.
osz SZ Memory size in pages. wchan WCHAN Event for which
the process is waiting. stime STIME T{ Start time of the
LC_CTYPE
Determines the set of printable characters and the character
width. Non-printable characters in arguments and file names are
dropped if writing to a terminal.
LC_TIME
Affects the format of date and time strings printed.
SYSV3 Changes the text of some headings as described above.
FILES
/etc/passwd
Used for converting numeric and symbolic user ids.
/etc/group
Used for converting numeric and symbolic group ids.
/etc/default/ps
/proc/
/dev/
SEE ALSO
nice(1), kill(1), priocntl(1), proc(5), locale(7)
NOTES
Things can change while ps is running; the picture it gives is only a
close approximation to reality.
Heirloom Toolchest 10/13/05 PS(1)
Man(1) output converted with
man2html