Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ps(1) — UNIX System III

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(1)

nice(1)

PS(1)  —  UNIX 3.0

NAME

ps − report process status

SYNOPSIS

ps [ options ]

DESCRIPTION

Ps prints certain information about active processes.  Without options, information is printed about processes associated with the current terminal. Otherwise, the information that is displayed is controlled by the following options:

−e Print information about all processes. 

−d Print information about all processes, except process group leaders. 

−a Print information about all processes, except process group leaders and processes not associated with a terminal. 

−f Generate a full listing.  (Normally, a short listing containing only process ID, terminal (“tty”) identifier, cumulative execution time, and the command name is printed.)  See below for meaning of columns in a full listing. 

−l Generate a long listing.  See below. 

−c corefile Use the file corefile in place of /dev/mem. 

−s swapdev Use the file swapdev in place of /dev/swap.  This is useful when examining a corefile; a swapdev of /dev/null will cause the user block to be zeroed out. 

−n namelist The argument will be taken as the name of an alternate namelist (/unix is the default). 

−t tlist Restrict listing to data about the processes associated with the terminals given in tlist, where tlist can be in one of two forms: a list of terminal identifiers separated from one another by a comma, or a list of terminal identifiers enclosed in double quotes and separated from one another by a comma and/or one or more spaces. 

−p plist Restrict listing to data about processes whose process ID numbers are given in plist, where plist is in the same format as tlist.

−u ulist Restrict listing to data about processes whose user ID numbers or login names are given in ulist, where ulist is in the same format as tlist. In the listing, the numerical user ID will be printed unless the −f option is used, in which case the login name will be printed. 

−g glist Restrict listing to data about processes whose process groups are given in glist, where glist is a list of process group leaders and is in the same format as tlist.

The column headings and the meaning of the columns in a ps listing are given below; 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 only determine what information is provided for a process; they do not determine which processes will be listed. 

F (l) Flags (octal and additive) associated with the process:

01 in core;

02 system process;

04 locked in core (e.g., for physical I/O);

10 being swapped;

20 being traced by another process. 

S (l) The state of the process:

0 non-existent;

S sleeping;

W waiting;

R running;

I intermediate;

Z terminated;

T stopped. 

UID (f,l) The user ID number of the process owner; the login name is printed under the −f option. 

PID (all) The process ID of the process; it is possible to kill a process if you know this datum. 

PPID (f,l) The process ID of the parent process. 

C (f,l) Processor utilization for scheduling. 

STIME (f) Starting time of the process. 

PRI (l) The priority of the process; higher numbers mean lower priority. 

NI (l) Nice value; used in priority computation. 

ADDR (l) The memory address of the process, if resident; otherwise, the disk address. 

SZ (l) The size in blocks of the core image of the process. 

WCHAN (l) The event for which the process is waiting or sleeping; if blank, the process is running. 

TTY (all) The controlling terminal for the process. 

TIME (all) The cumulative execution time for the process. 

CMD (all) The command name; the full command name and its arguments are printed under the −f option. 

A process that has exited and has a parent, but has not yet been waited for by the parent, is marked <defunct>. 

Under the −f option, ps tries to determine the command name and arguments given when the process was created by examining memory or the swap area.  Failing this, the command name, as it would appear without the −f option, is printed in square brackets. 

FILES

/unixsystem namelist
/dev/memmemory
/devsearched to find swap device and terminal (“tty”) names. 

SEE ALSO

kill(1), nice(1). 

BUGS

Things can change while ps is running; the picture it gives is only a close approximation to reality.  Some data printed for defunct processes are irrelevant. 

May 16, 1980

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026