PS(1B) | BSD System Compatibility | PS(1B) |
ps - (BSD) process status
/usr/ucb/ps [-aAcglnrSuvwx] [-o
property[=[title]], ...] ...
[-GptU criteria, ...] ... [pid]
Ps prints certain indicia about active processes. If no options are specified, all processes on the current terminal that are owned by the invoking user and are not session leaders are selected. Specifying -a selects other users' processes; specifying -x selects processes without controlling terminals. The selection can further be changed by adding criteria with the options below; when a process satifies any criterion, it is selected. A criteria string can consist of multiple criteria separated by blanks or commas. If the pid argument is present, output is restriced to the selected process.
By default, ps prints the process id, controlling terminal device, process status, cumulative execution time and command of processes.
The ps command accepts the following options:
The following options have been introduced by POSIX.2:
The meaning of columns and column headings are as follows:
F | Flags associated with the process (octal and additive): | ||
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 | The state of the process: | ||
R | running; | ||
S | sleeping; | ||
I | intermediate; | ||
Z | terminated; | ||
T | stopped; | ||
X | allocating memory. | ||
UID | The effective user ID of the process owner. | ||
USER | The name of the process owner, based on the effective user ID. | ||
PID | The process id of the process; as in certain cults it is possible to kill a process if you know its true name. | ||
PPID | The process ID of the parent process. | ||
CP | Processor utilization for scheduling. | ||
PRI | Priority. High numbers mean low priority. | ||
NI | Nice value, used in priority computation. | ||
ADDR | The core address of the process. | ||
RSS | The amount of memory in pages currently present in core. | ||
SZ | The size in pages of the core image of the process. | ||
WCHAN | The event for which the process is waiting or sleeping; if blank, the process is running. | ||
START | The time when the process was started. | ||
TT | The controlling tty for the process. | ||
TIME | The cumulative execution time for the process, including its terminated children if -S is present. | ||
COMMAND | The command line; with the -c option, the command name. |
A process that has exited and has a parent, but has not yet been waited for by the parent is marked <defunct>.
For the -o option, the following properties (listed with their default column headings) can be given:
user | USER | Effective user name. |
ruser | RUSER | Real user name. |
group | GROUP | Effective group name. |
rgroup | RGROUP | Real group name. |
pid | PID | Process id. |
ppid | PPID | Parent process id. |
pgid | PGID | Process group id. |
sid | SID | Session id. |
class | CLASS | Scheduling class. |
pcpu | %CPU | Processor usage in percent. |
vsz | VSZ | Memory usage in kilobytes. |
nice | NI | Nice value. |
etime | ELAPSED | Time elapsed since the process was started. |
time | TIME | Cumulative execution time. |
tty | TTY | Controlling terminal device. |
comm | COMMAND | The first command line argument. |
args | COMMAND | Command line arguments separated by spaces. |
f | F | Process flags. |
s | S | Process state. |
c | C | Processor utilization for scheduling. |
uid | UID | Numeric effective user id. |
ruid | RUID | Numeric real user id. |
gid | GID | Numeric effective group id. |
rgid | RGID | Numeric real group id. |
pri | PRI | Priority; high numbers mean high priority. |
opri | PRI | Priority; high numbers mean low priority. |
psr | PSR | Processor. |
addr | ADDR | Core address. |
osz | SZ | Memory size in pages. |
wchan | WCHAN | Event for which the process is waiting. |
stime | STIME | Start time of the process. |
rss | RSS | Resident set size in kilobytes. |
pmem | %MEM | Memory usage in percent. |
fname | COMMAND | The first 16 characters of the executable file for the process. |
For those properties that correspond to user or group names, the numeric id is printed if the name does not fit into the column width.
nice(1), priocntl(1), kill(1), proc(5), locale(7)
Things can change while ps is running; the picture it gives is only a close approximation to reality.
9/5/05 | Heirloom Toolchest |