PS(1)

NAME
ps — display process status

SYNOPSIS
ps 0acefhHjlmnprsStuUvwxXy [-txx|pid,..] systempath swappath

DESCRIPTION
Ps shows information about running processes. tty name or pid must be given after the last option, no space between options and pid or tty, - is optional.

Description of the displayed fields:

PRI priority, this is not the priority in task_struct, a low number means that the process gets more cpu time if it can run.

NI  nice value, a positive value means less cpu time.

SIZE
    virtual image size, size of text+data+stack

RSS resident set size, kilobytes of program in memory.

WCHAN
    name of the kernel function where the process is sleeping.

STAT
    status

    R   runnable

    S   sleeping

    I   idle

    D   uninterruptible sleep

    T   stopped or traced

    Z   zombie

    P   swapping

    W   process has no resident pages

    x   process is being traced (with a debugger)

    X   system calls are traced

    s   process is a session leader

    +   process is in a foreground process group

%CPU
    percentage of cpu time / real time, this is different from other ps programs.

%MEM
    percentage of available memory in use by this process, the total of all processes can exceed 100% because of shared pages. This is not a decaying average as in other ps programs.

TTY controlling tty

TPGID
    current process group of controlling tty

PAGEIN
    number of major page faults

TRS text resident size, does not include shared libraries

DRS data resident size, includes dirty library pages and stack.

SWAP
    kilobytes (with -p pages) on swap device

SHRD
    shared text size

DT  dirty library pages (kb or # pages with -p)

F   process flags

    10  process is being traced

OPTIONS

-0  include process 0, the scheduler process

-a  show processes of all users instead of just the use invoking ps

-c  show command name stored in task_struct

-e  show environment, cannot be combined with -c option

-f  show forest of processes by indenting command lines to show the parent/child relationships in a tree structure

-h  no header

-H  help summary

-j  jobs format: pgid sid

-l  long format: wchan, nice value, priority

-m  displays memory info (combine with -p flag to get number of pages): shared and swapped sizes, minor and major page faults. The size field shown with this option is the size computed from the page tables, it should be equal to the sum of SWAP and RSS.

-n  numeric output for USER and WCHAN

-p  show memory counts in pages instead of kilobytes

-r  running processes only, these include processes in an uninterruptible sleep

-s  signal format

-S  add cpu time and page fault count from reaped children

-txx
    only procs with controlling tty xx, use for xx the same letters as shown in TT field. If xx is omitted the controlling terminal of ps is used.

-u  user format: gives user name and start-time

-U  update psdatabase. The arguments syspath and swappath if given are stored in the psdatabase and the symbol info is updated, if no system path is given the path in the old psdatabase is used.

-v  vm format

-w  wide output, can be specified more then once

-x  show processes without controlling terminal

-X  another format: displays flags, the registers eip and esp, timeout and alarm

-y  system call format: displays the system call in which the process is sleeping or which it has just left.

FILES
/dev/kmem kernel memory
/dev/swap swapdevice or (link to) swap file
/etc/psdatabase symbol information

SEE ALSO
kill(1)

BUGS
%CPU and %MEM don't give decaying averages, %CPU is different from UNIX ps.

Things can change while ps is running, the picture it gives is only a close approximation to reality.

AUTHOR
Branko Lankester <branko@hacktic.nl>
Initial man-page by Michael Haardt