ps(1)
NAME
ps − process status
SYNTAX
ps [ −alxvt# ] [ namelist ] [ corefile ]
DESCRIPTION
The ps command prints information about active processes. The −a option asks for information about all processes with terminals. Ordinarily only one’s own processes are displayed. The −x option asks even about processes with no terminal and −l asks for a long listing. The short listing contains the process ID, tty letter, the cumulative execution time of the process and an approximation to the command line. If −v is given and −l is not present, the sums of the child process’s system and user times are printed following the cumulative execution time. The −t option limits printouts to those processes associated with tty#. Specifying ? as the tty number to the −t option will limit printouts to those processes not associated with a tty.
The long listing is columnar and contains
F Flags associated with the process. 001: in core; 002: system process; 004: locked in core (for example, for physical I/O); 010: being swapped; 020: being traced by another process; 040: another tracing flag; 100: user settable text lock in core; 200: detached inherited by init; 400: using new signal mechanism; 1000: user settable data lock in core.
S The state of the process. 0: nonexistent; S: sleeping; W: waiting; R: running; I: intermediate; Z: terminated; T: stopped.
UID The user ID of the process owner.
PID The process ID of the process;
PPID The process ID of the parent process.
CPU Processor utilization for scheduling.
PRI The priority of the process; high numbers mean low priority.
NICE Used in priority computation.
ADDR
If the process is resident, the memory address in octal expressed as 64 byte clicks. ADDR is left shifted six places to obtain the physical memory address. If the process is swapped out, its disk address is displayed (decimal) and indicates the block number relative to the start of the swap area, where the image of the process resides.
SZ The size in 512 byte blocks of the core image of the process.
WCHAN
The event for which the process is waiting or sleeping; if blank, the process is running.
TTY The controlling tty for the process.
TIME
The cumulative execution time for the process.
The command and its arguments.
A process that has exited and whose parent has not waited for it is marked <defunct>. The ps command makes an educated guess as to the file name and arguments given when the process was created by examining core memory or the swap area. The method is inherently somewhat unreliable and in any event a process is entitled to destroy this information, so the names cannot be counted on too much.
The optional third argument specifies a corefile to be used in place of /dev/mem. This is used for postmortem system debugging. If a second argument is given, it is taken to be the file containing the system’s namelist.
RESTRICTIONS
Things can change while ps is running; the picture it gives is only a close approximation to reality.
FILES
/unixdefault system namelist
/dev/memdefault core memory file
/usr/crash/corealternate core file for crash dump analysis
/devsearched to find swap device and tty names
SEE ALSO
kill(1)
ULTRIX-11 System Management Guide