Contact Sales Sitemap Customer Login

Linux Command Reference: ps

ps is a system administration tool which returns a process snapshot for the present user account or a snapshot of all processes running on the system when run under the root account with the -A, -e, or BSD-style a option.

Contents

Using ps

Enter ps faux --cumulative to quickly list all running processes. Output will resemble the following:

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  1516  520 ?        Ss   May30   0:05 init [2]
root      1559  0.0  0.1  1564  536 ?        Ss   May30   0:00 /sbin/syslogd
root      1579  0.0  0.2  2512 1228 ?        S    May30   0:00 /bin/sh /usr/bin/
root      1598  0.0  0.1  2512  560 ?        S    May30   0:00  \_ /bin/sh /usr/
mysql     1599  0.0  3.2 97960 16464 ?       S    May30   0:02      \_ /usr/sbin
root      1600  0.0  0.0  1496  504 ?        S    May30   0:00      \_ logger -p
daemon    1673  0.0  0.0  1696  368 ?        Ss   May30   0:00 /usr/sbin/atd
root      1676  0.0  0.1  1776  748 ?        Ss   May30   0:02 /usr/sbin/cron
root      1683  0.0  0.8 10516 4216 ?        S    May30   0:00 /usr/sbin/apache
www-data  1696  0.0  0.3 10520 1988 ?        S    May30   0:00  \_ /usr/sbin/apa
www-data  1697  0.0  0.3 10520 1960 ?        S    May30   0:00  \_ /usr/sbin/apa
root     11830  0.0  0.1  3472  896 ?        Ss   May30   0:03 /usr/sbin/sshd
root     28133  0.0  0.3 14576 2000 ?        Ss   02:38   0:00  \_ sshd: root@pt
root     28166  0.0  0.2  2568 1412 pts/0    Rs   02:38   0:00      \_ -bash
root     13826  0.0  0.1  2500  816 pts/0    R+   03:49   0:00          \_ ps fa


Column Names

Commonly-used columns:

  1. USER - Username - The name of the user associated with the process
  2. PID - Process ID - The unique numeric identifier assigned to the process
  3. %CPU - Percentage of CPU - Time used (total CPU time divided by length of time the process has been running)
  4. %MEM - Percentage of RAM - Memory used (memory used divided by total memory available)
  5. VSZ - Virtual Memory Size - Size of the process in virtual memory expressed in KiB
  6. RSS - ???
  7. TTY - Terminal controlling the process
  8. STAT - Process State - Possible values:
    • R - Running
    • S - Sleeping (may be interrupted)
    • D - Sleeping (may not be interrupted) - used to indicate process is handling input/output
    • T - Stopped or being traced
    • Z - Zombie or "hung" process
  9. START - The date or time at which the process started
  10. TIME - Cumulative CPU time used by the process and the child processes started by the process
  11. COMMAND - Command used to start the process


Help and Manual

Enter ps --help to view available options or enter man ps to read the manual.


Related Commands

Retrieved from "http://wiki.vpslink.com/index.php?title=Linux_Command_Reference:_ps&oldid=15300"
Recent Changes | RSS RSS Feed