HP-UX Reference (11i v2 04/09) - 1 User Commands N-Z (vol 2)

p
ps(1) ps(1)
NAME
ps - report process status
SYNOPSIS
ps [-adeflPzx] [-g grplist ][
-p proclist ][-R prmgrplist ][-t termlist ][
-u uidlist ]
[
-Z pset_list ]
XPG4 Synopsis
ps [-aAcdefHjlPzx][-C
cmdlist][-g grplist ][-G gidlist][-n namelist ][
-o format ]
[
-p proclist ][-R
prmgrplist ][-s sidlist ][-t termlist ][-u uidlist ][
-U uidlist ][-Z pset_list ]
DESCRIPTION
ps prints information about selected processes. Use options to specify which processes to select and what
information to print about them.
Process Selection Options
Use the following options to choose which processes should be selected.
NOTE: If an option is used in both the default (standard HP-UX) and XPG4 environments, the descrip-
tion provided here documents the default behavior. Refer to the
UNIX95 variable under EXTERNAL
INFLUENCES for additional information on XPG4 behavior.
(none) Select those processes associated with the current terminal.
-A (XPG4 Only.) Select all processes. (Synonym for -e.)
-a Select all processes except process group leaders and processes not associated with
aterminal.
-C cmdlist (XPG4 Only.) Select processes executing a command with a basename given in
cmdlist.
-d Select all processes except process group leaders.
-e Select all processes.
-g grplist Select processes whose process group leaders are given in grplist .
-G gidlist (XPG4 Only.) Select processes whose real group ID numbers or group names are
given in gidlist .
-n namelist (XPG4 Only.) This option is ignored; its presence is allowed for standards compli-
ance.
-p proclist Select processes whose process ID numbers are given in proclist .
-R prmgrplist Select processes belonging to PRM process resource groups whose names or ID
numbers are given in prmgrplist . See DEPENDENCIES.
-s sidlist (XPG4 Only.) Select processes whose session leaders are given in sidlist . (Synonym
for -g).
-t termlist Select processes associated with the terminals given in termlist .Terminal
identifiers can be specified in one of two forms: the device’s file name (such as
tty04) or if the device’s file name starts with tty, just the rest of it (such as 04).
If the device’s file is in a directory other than /dev or /dev/pty, the terminal
identifier must include the name of the directory under /dev that contains the dev-
ice file (such as pts/5).
-u uidlist Select processes whose effective user ID numbers or login names are given in
uidlist .
-U uidlist (XPG4 Only.) Select processes whose real user ID numbers or login names are
given in uidlist .
-Z pset_list Select processes whose processor set ID’s are given in pset_list . This option is sup-
ported only if the kernel supports processor sets functionality.
If any of the
-a, -A, -d,or-e options is specified, the -C, -g, -G, -p, -R, -t, -u, -Z, and -U options
are ignored.
Section 1760 Hewlett-Packard Company 1 HP-UX 11i Version 2: September 2004