ps" -- Command" "

Print process status

ppss [[--]][[aaddeeffggllmmnnrrttwwxx]] [[--cc _s_y_s]] [[_m_e_m]] [[--pp_p_i_d,,_p_i_d,,......,,_p_i_d_]

ps prints information about a process or processes. It prints the information in fields, followed by the command name and arguments. The fields include the following:

TTTTYY
The controlling terminal of the command, printed in short form. For example, ``tty44:'' means /dev/tty44. A dash means there is no controlling terminal.

PPIIDD
Process id; necessary to know when the process is to be killed.

GGRROOUUPP
PID of the group leader of the process, that is, the shell that started up when the user logged in.

PPPPIIDD
PID of the parent of the process; very often a shell.

UUIIDD
User id or name of the owner.

KK
Size of the process, in kilobytes.

FF
Process flag bits, as follows:
PPFFCCOORREE  00001 Process is in core
PPFFLLOOCCKK  00002 Process is locked in core
PPFFSSWWIIOO  00004 Swap I/O in progress
PPFFSSWWAAPP  00010 Process is swapped out
PPFFWWAAIITT  00020 Process is stopped (not waited)
PPFFSSTTOOPP  00040 Process is stopped (waited on)
PPFFTTRRAACC  00100 Process is being traced
PPFFKKEERRNN  00200 Kernel process
PPFFAAUUXXMM  00400 Auxiliary segments in memory
PPFFDDIISSPP  01000 Dispatch at earliest convenience
PPFFNNDDMMPP  02000 Command mode forbids dump
PPFFWWAAKKEE  04000 Wakeup requested

SS
State of the process, as follows:
RR    Ready to run (waiting for CPU time)
SS    Stopped for other reasons (I/O completion, pause, etc.)
TT    Being traced by another process
WW    Waiting for an existent child
ZZ    Zombie (dead, but parent not waiting)

EEVVEENNTT
The condition that the process is anticipating. This not applicable if the process is ready to run. The following gives the legal symbolic names of events. If a driver does not support symbolic event names, ps prints a unique hexadecimal number instead:
_S_y_s_t_e_m _S_l_e_e_p_s_:
bbppwwaaiitt    Wait for a buffer to become valid
bbuuffnneeeedd   Wait for a free buffer to become available
bbwwrriittee    Wait for a buffer write to finish
iioorreeqq     An IO request is being processed
ppaauussee     This process is in the ppaauussee(()) system call
ppiippee ddaattaa Wait for data to appear in a pipe
ppiippee wwxx
ppoollll      Wake for polled event, poll timeout, or signal
ppttrraaccee    Send a ppttrraaccee command to a traced child
ppttrreett     Wait for signal processing in a traced child to complete
ppwwrriittee    Wait for a pipe to empty enough for a write
sswwaapp      Wait for a process to get swapped in
wwaaiitt      Wait for a child to terminate
wwaaiittqq     Wait for more character queues to become available
_D_r_i_v_e_r _S_l_e_e_p_s
aahhaa::ccccbb   AHA-154x driver is waiting for a SCSI command to complete
nnkkbbccmmdd
nnkkbbccmmdd......
nnkkbbccmmdd22
nnkkbbccmmdd22......nnkkbb is waiting for a command to complete
ppttyyccdd     Pseudoterminal driver is waiting for carrier
ppttyyrreeaadd   Pseudoterminal driver is waiting for a read
ppttyywwrriittee  Pseudoterminal driver is waiting for a write
ttttyyddrraaiinn  Line discipline is waiting for a tty to drain
ttttyyiiooddrrnn  iiooccttll(()) asked line discipline to let tty output drain
ttttyyooqq     Line discipline is waiting for an output queue to drain
ttttyywwaaiitt   Line discipline is waiting for more data

CCVVAALL SSVVAALL IIVVAALL RRVVAALL
Scheduling information; bigger is better.

UUTTIIMMEE
Time consumed while running in the program (in seconds).

SSTTIIMMEE
Time consumed while running in the system (in seconds).

Normally, ps displays the TTY and PID fields of each active process started on the caller's terminal, as well as the command name and arguments. The following flags alter this behavior.

--aa
Display information about processes started from all terminals.

--cc _s_y_s
This option does nothing; it is included to preserve the integrity of some shell scripts.

--dd
Print information about status of loadable drivers.

--ee
Same as --aa. This is included for compatibility with other implementation of ps.

--ff
Blank fields have `-' place-holders. This enables field-oriented commands like sort and awk to process the output.

--gg
Print the group leader field GROUP if the ll option is given.

--kk _m_e_m
The next argument mem is the memory image (default, /dev/mem). Note that this argument currently does nothing; it is included only to preserve old shell scripts. The COHERENT implementation of ps reads information from /dev/ps. This permits ps to be smaller and faster, helps to avoid ``ghosts,'' and to be atomic.

--ll
Long format. In addition to the TTY and PID fields, prints the PPID, UID, K, F, S and EVENT fields.

--mm
This option does nothing; it is included to preserve the integrity of some shell scripts.

--nn
Suppress the header line.

--pp_p_i_d,,_p_i_d,,......,,_p_i_d
Print information for each process identifier pid in the comma-separated list.

--rr
Print the real size of the process, which includes the user and auxiliary segments assigned to the process. Because the user segment (usually 1 kilobyte) is shared by all processes owned by that user, this may give a misleading total size for all the user's processes.

--tt
Print elapsed CPU time fields UTIME and STIME.

--ww
Wide format output; print 132 columns instead of 80.

--xx
Display processes which do not have a controlling terminal.

Files

//ddeevv//ppss -- Device for a system driver //ddeevv//ttttyy** -- List of terminal names

See Also