HP-UX Reference (11i v3 07/02) - 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]
UNIX Standard 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 UNIX Standard (see standards(5))
environments, the description provided here documents the default behavior. Refer to the Notes section for
additional information on UNIX Standard behavior.
(none) Select those processes associated with the current terminal.
-A (UNIX Standard Only, see standards(5)) Select all processes. (Synonym for -e.)
-a Select all processes except process group leaders and processes not associated with a
terminal.
-C cmdlist (UNIX Standard Only, see standards(5)) 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 (UNIX Standard Only, see standards(5)) Select processes whose effective group ID
numbers or group names are given in gidlist.
-n namelist (UNIX Standard Only, see standards(5)) This option is ignored; its presence is allowed
for standards compliance.
-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 (UNIX Standard Only, see standards(5)) 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 device file (such as pts/5).
-u uidlist Select processes whose real user ID numbers or login names are given in uidlist.
-U uidlist (UNIX Standard Only, see standards(5)) 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.
If more than one of
-a, -A, -d, and -e are specified, the least restrictive option takes effect.
154 Hewlett-Packard Company − 1 − HP-UX 11i Version 3: February 2007