2 .\" Copyright (c) 2002, Sun Microsystems, Inc. - All Rights Reserved.
3 .\" Copyright (c), 1980 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
4 .TH PS 1B "May 26, 2006"
6 ps \- display the status of current processes
10 \fB/usr/ucb/ps\fR [\fB-aceglnrSuUvwx\fR] [\fB-t\fR \fIterm\fR] [\fInum\fR]
16 The \fBps\fR command displays information about processes. Normally, only those
17 processes that are running with your effective user \fBID\fR and are attached
18 to a controlling terminal (see \fBtermio\fR(7I)) are shown. Additional
19 categories of processes can be added to the display using various options. In
20 particular, the \fB-a\fR option allows you to include processes that are not
21 owned by you (that do not have your user \fBID\fR), and the \fB-x\fR option
22 allows you to include processes without controlling terminals. When you specify
23 both \fB-a\fR and \fB-x\fR, you get processes owned by anyone, with or without
24 a controlling terminal. The \fB-r\fR option restricts the list of processes
25 printed to running and runnable processes.
28 \fBps\fR displays in tabular form the process ID, under \fBPID\fR; the
29 controlling terminal (if any), under \fBTT\fR; the cpu time used by the process
30 so far, including both user and system time, under \fBTIME\fR; the state of the
31 process, under S; and finally, an indication of the \fBCOMMAND\fR that is
35 The state is given by a single letter from the following:
42 Process is running on a processor.
51 Sleeping. Process is waiting for an event to complete.
60 Runnable. Process is on run queue.
69 Zombie state. Process terminated and parent not waiting.
78 Traced. Process stopped by a signal because parent is tracing it.
84 The following options must all be combined to form the first argument:
91 Includes information about processes owned by others.
100 Displays the command name rather than the command arguments.
109 Displays the environment as well as the arguments to the command.
118 Displays all processes. Without this option, \fBps\fR only prints interesting
119 processes. Processes are deemed to be uninteresting if they are process group
120 leaders. This normally eliminates top-level command interpreters and processes
121 waiting for users to login on free terminals.
130 Displays a long listing, with fields \fBF\fR, \fBPPID\fR, \fBCP\fR, \fBPRI\fR,
131 \fBNI\fR, \fBSZ\fR, \fBRSS\fR, and \fBWCHAN\fR as described below.
140 Produces numerical output for some fields. In a user listing, the \fBUSER\fR
141 field is replaced by a \fBUID\fR field.
150 Restricts output to running and runnable processes.
159 Displays accumulated \fBCPU\fR time used by this process and all of its reaped
166 \fB\fB-t\fR \fIterm\fR\fR
169 Lists only process data associated with the terminal, \fIterm\fR. Terminal
170 identifiers may be specified in one of two forms: the device's file name (for
171 example, \fBtty04\fR or \fBterm/14\fR ) or, if the device's file name starts
172 with \fBtty\fR, just the digit identifier (for example, \fB04\fR).
181 Displays user-oriented output. This includes fields \fBUSER\fR, \fB%CPU\fR,
182 \fB%MEM\fR, \fBSZ\fR, \fBRSS\fR, and \fBSTART\fR as described below.
191 Obsolete. This option no longer has any effect. It causes \fBps\fR to exit
192 without printing the process listing.
201 Displays a version of the output containing virtual memory. This includes
202 fields \fBSIZE\fR, \fB%CPU\fR, \fB%MEM\fR, and \fBRSS\fR, described below.
211 Uses a wide output format, that is, 132 columns rather than 80. If the option
212 letter is repeated, that is, \fB-ww\fR, this option uses arbitrarily wide
213 output. This information is used to decide how much of long commands to print.
214 \fBNote:\fR The wide output option can be viewed only by a superuser or the
215 user who owns the process.
224 Includes processes with no controlling terminal.
233 A process number may be given, in which case the output is restricted to that
234 process. This option must be supplied last.
240 Fields that are not common to all output formats:
247 Name of the owner of the process.
256 \fBCPU\fR use of the process. This is a decaying average over up to a minute of
257 previous (real) time.
266 Process scheduling increment (see \fBgetpriority\fR(3C) and \fBnice\fR(3UCB)).
275 The total size of the process in virtual memory, including all mapped files and
276 devices, in kilobyte units.
294 Real memory (resident set) size of the process, in kilobyte units.
303 Numerical user-ID of process owner.
312 Numerical \fBID\fR of parent of process.
321 Short-term \fBCPU\fR utilization factor (used in scheduling).
330 The priority of the process (higher numbers mean lower priority).
339 The starting time of the process, given in hours, minutes, and seconds. A
340 process begun more than 24 hours before the \fBps\fR inquiry is executed is
341 given in months and days.
350 The address of an event for which the process is sleeping (if blank, the
360 The ratio of the process's resident set size to the physical memory on the
361 machine, expressed as a percentage.
370 Flags (hexadecimal and additive) associated with the process. These flags are
371 available for historical purposes; no meaning should be currently ascribed to
377 A process that has exited and has a parent, but has not yet been waited for by
378 the parent, is marked <\fBdefunct\fR>\|; otherwise, \fBps\fR tries to determine
379 the command name and arguments given when the process was created by examining
388 \fB\fB/etc/passwd\fR\fR
391 \fBUID\fR information supplier
397 \fBkill\fR(1), \fBps\fR(1), \fBwhodo\fR(1M), \fBgetpriority\fR(3C),
398 \fBnice\fR(3UCB), \fBproc\fR(4), \fBattributes\fR(5), \fBtermio\fR(7I)
402 Things can change while \fBps\fR is running. The picture \fBps\fR gives is only
403 a close approximation to the current state. Some data printed for defunct
404 processes is irrelevant.