ps

NAME

ps - Windows command-line utility to write information about processes

SYNOPSIS

ps [-A] [-efl] [-G grouplist] [-o format]... [-p proclist] [-u userlist]

DESCRIPTION

The ps(1w) utility writes information about processes if it has appropriate permissions to do so.

The ps utility supports the following options:

-A
Writes information for all processes.
-e
Writes information for all processes (equivalent to the -A option).
-f
Generates a full listing. (See the "Format specifications" section later in this topic for the contents of a full listing.)
-l
Generates a long listing. (See the "Format specifications" section later in this topic for the contents of a long listing.)
-G
Writes information for processes whose group names are given in grouplist. The grouplist must be in the form of a blank- or comma-separated list.
-o
Writes information according to the format specification given in format. Multiple -o options can be specified. The format specification will be interpreted as the concatenation (separated by space characters) of all the format option-arguments.
-p
Writes information for processes whose process identifier (ID) numbers are given in proclist. The proclist must be in the form of a blank- or comma-separated list.
-u
Writes information for processes whose user names are given in userlist. The userlist must be in the form of a blank- or comma-separated list.

DIAGNOSTICS

Possible exit-status values are:

0
Successful completion
1
Failure

FORMAT SPECIFICATIONS

The -o option allows the output format to be specified under user control. When the -o option is not specified, the fields shown in the following table are displayed. The letters f and l indicate the option full or long, that causes the corresponding heading to appear; all means that the heading always appears. Note that these two options (f and l) determine only the information provided for a process; they do not determine the processes that are listed.

USER(f,l)
User name
PID (all)
Process ID of the process
PRI (l)
Priority of the process
ADDR (l)
Starting address of the process
SZ (l)
Size of the process in physical memory, in kilobytes
STIME (f)
Start time of the process
COMMAND (all)
Instance name of the process
PAFF(f)
Processor affinity for the process
THRD (f)
Number of threads in the process
F
Flags (octal and additive) associated with the process
S
State of the process
PPID
Process ID of the parent process
NI
Nice value
WCHAN
The event for which the process is waiting or sleeping
TTY
Controlling terminal for the process
TIME (all)
Processor time for the process
C (f,l)
Processor utilization for scheduling

The format specification must be a list of names presented as a single argument that is separated by a blank or comma. Each variable has a default header. The default header can be overridden by appending an equal sign (=) and the new text of the header. The rest of the characters in the argument are used as the header text.

The specified fields are written in the order specified on the command line and should be arranged in columns in the output. The field widths selected by the system are at least as wide as the header text (default or overridden value). If the header text is null, such as -o user=, the field width is at least as wide as the default header text. If all header text fields are null, no header line is written.

The ps utility supports the following -o format specifications:

ruser
Real user name of the process
user
Effective user name of the process
rgroup
Real group name of the process
group
Effective group name of the process
pid
Decimal value of the process ID
pcpu
Percentage of CPU utilization for the process
vsz
Size of the process in virtual memory, in kilobytes
etime
Elapsed time since the process was started, in the form  [[dd-]hh:]mm:ss, where dd represents the number of days, hh the number of hours, mm the number of minutes, and ss the number of seconds. The dd field will be a decimal integer. The hh, mm, and ss fields are two-digit decimal integers padded on the left with zeros.
comm
Instance name of the process
ppid
Process ID of the parent process
pri
Priority of the process
size
Size of the process in physical memory, in kilobytes
nice
Nice value
time
Processor time for the process
stime
Start time of the process
tty
Controlling terminal for the process
args
Full path of the instance
pgid
Decimal value for the process group ID
addr
Starting address of the process
paff
Processor affinity for the process
tcount
Number of threads in the process

If the -o format is specified, the following will be the default headers:

ruser
RUSER
user
USER
rgroup
RGROUP
group
GROUP
pid
PID
pcpu
%CPU
vsz
VSZ
etime
ELAPSED
comm
COMMAND
ppid
PPID
pri
PRI
size
SIZE
nice
NI
time
TIME
stime
STIME
tty
TTY
args
ARGS
pgid
PGID
addr
ADDR
paff
PAFF
tcount
THRDS

SEE ALSO

kill(1w)

sleep(1w)

top(1w)

wait(1w)