The ps utility displays information about active
processes. When given no options, ps prints
information about processes of the current user that have a controlling
terminal.

The information displayed is selected based on a set of keywords (and for even
more control, see the -L,
-O, and -o options).
The default output format includes, for each process, the process's ID,
controlling terminal, state, CPU time (including both user and system time),
and associated command.

Add the information associated with the space or comma
separated list of keywords specified, after the process ID, in the default
information display. Keywords may be appended with an equals sign
(‘=’) and a string. This causes the printed header to use
the specified string instead of the standard header.

Display information associated with the space or comma
separated list of keywords specified. Keywords may be appended with an
equals sign (‘=’) and a string. This causes the printed
header to use the specified string instead of the standard header.

Use 132 columns to display information, instead of the
default, which is the window size. If the -w
option is specified more than once, ps will
use as many columns as necessary without regard for window size.

Alias: pcpu. The CPU
utilization of the process; this is a decaying average over up to a minute
of previous (real) time. Since the time base over which this is computed
varies (since processes may be very young) it is possible for the sum of
all %cpu fields to exceed 100%.

The time the command started. If the command started less
than 24 hours ago, the start time is displayed using the
“%l:%M%p” format described in
strftime(3). If the
command started less than 7 days ago, the start time is displayed using
the “%a%I%p” format. Otherwise, the start time is displayed
using the “%e%b%y” format.

An abbreviation for the pathname of the controlling
terminal, if any. The abbreviation consists of the two letters following
“/dev/tty”, or, for the console, “co”. This is
followed by a ‘-’ if the process can no longer reach that
controlling terminal (i.e. it has been revoked).

The event (an address in the system) on which a process
waits. When printed numerically, the initial part of the address is
trimmed off and the result is printed in hex; for example, 0x80324000
prints as 324000.

If set to a positive integer, output is formatted to the
given width in columns. Otherwise, ps
defaults to the terminal width minus 1. If none of
stdout,
stderr, and
stdin are a terminal, 79 columns are
used.

The character encoding
locale(1). It decides which
byte sequences form characters, which characters are printable, and what
their display width is. If unset or set to “C”,
“POSIX”, or an unsupported value, only printable ASCII
characters are printed. Tabs, newlines, non-printable ASCII characters,
and non-ASCII bytes are encoded with
vis(3). If UTF-8 output is
enabled, valid characters that are not printable are replaced with the
Unicode replacement character U+FFFD. These rules for example apply to
command names, arguments, and environments and to directory, user, and
group names.

The ps utility is compliant with the
IEEE Std 1003.1-2008
(“POSIX.1”) specification, except that the flag
[-G] is unsupported and
the flags [-ptU] support
only single arguments, not lists.

The flags [-defglnu] are
marked by IEEE Std 1003.1-2008
(“POSIX.1”) as being an X/Open System Interfaces option.
Of these, [-dfgn] are not
supported by this implementation of ps; behaviour
for the flags [-elu]
differs between this implementation and the X/Open System Interfaces option of
IEEE Std 1003.1-2008
(“POSIX.1”).

The flags
[-cHhjkLMmNOrSTvWwx] are
extensions to IEEE Std 1003.1-2008
(“POSIX.1”).

When printing using the command keyword, a process
that has exited and has a parent that has not yet waited for the process (in
other words, a zombie) is listed as “⟨defunct⟩”,
and a process which is blocked while trying to exit is listed as
“⟨exiting⟩”. ps makes
an educated guess as to the file name and arguments given when the process was
created by examining memory or the swap area. The method is inherently
somewhat unreliable and in any event a process is entitled to destroy this
information, so the names cannot be depended on too much. The
ucomm (accounting) keyword can, however, be
depended on.

The information displayed is only a snapshot of a constantly changing
system.