HP-UX Reference (11i v2 07/12) - 1 User Commands N-Z (vol 2)
p
ps(1) ps(1)
tty The controlling terminal for the process. The default heading for this column is
TT if
-o is specified and TTY otherwise.
uid The user ID number of the effective process owner.
user The login name of the effective process owner.
vsz The size in kilobytes (1024 byte units) of the core image of the process. See column
sz, above.
wchan The event for which the process is waiting or sleeping; if there is none, a hyphen (-) is
displayed.
Notes
ps prints the command name and arguments given at the time of the process was created. If the process
changes its arguments while running (by writing to its argv array), these changes are not displayed by
ps.
A process that has exited and has a parent, but has not yet been waited for by the parent, is marked
<defunct> (see zombie process in exit(2)).
The time printed in the
stime column, and used in computing the value for the etime column, is the
time when the process was forked, not the time when it was modified by
exec().
To make the
ps output safer to display and easier to read, all control characters in the
comm and args
columns are displayed as "visible" equivalents in the customary control character format,
ˆx.
The default length of the
COMMAND field will be 128 (including the null terminator). This can be configured
by setting DEFAULT_CMD_LINE_WIDTH=
value in the /etc/default/ps file. The value of
DEFAULT_CMD_LINE_WIDTH
should be between 64 and 1020. However, when the comm column is
displayed, the length of the
COMMAND field will be 14 unless the variable PS_CMD_BASENAME
is defined.
EXTERNAL INFLUENCES
Environment Variables
UNIX95 specifies to use the XPG4 behavior for this command. The changes for XPG4 include support for
the entire option set specified above and include the following behavioral changes:
• The TIME column format changes from mmmm:ss to [dd-]hh
:mm:ss.
• When the
comm, args, user, and prmgrp fields are included by default or the
-f or -l flags
are used, the column headings of those fields change to
CMD, CMD, USER
, and PRMGRP, respec-
tively.
•
-a, -d, and -g will select processes based on session rather than on process group.
• The uid or user column displayed by -f or -l will display effective user rather than real user.
• The -u option will select users based on effective UID rather than real UID.
• The -C and -H options are enabled. These options are not part of UNIX Standard.
LC_TIME determines the format and contents of date and time strings. If it is not specified or is null, it
defaults to the value of LANG.
If LANG is not specified or is null, it defaults to C (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to
C (see environ(5)).
When PS_CMD_BASENAME is defined, the basename of args is displayed, instead of the basename of
comm.
International Code Set Support
Single-byte character code sets are supported.
EXAMPLES
Generate a full listing of all processes currently running on your machine:
ps -ef
To see if a certain process exists on the machine, such as the cron clock daemon, check the far right
column for the command name, cron, or try
182 Hewlett-Packard Company − 4 − HP-UX 11i Version 2: December 2007 Update