275

When typing the command ps aux, what does each column of the output mean? For example:

$ ps aux  
timothy  29217  0.0  0.0 11916 4560 pts/21   S+   08:15   0:00 pine  
root     29505  0.0  0.0 38196 2728 ?        Ss   Mar07   0:00 sshd: can [priv]   
can      29529  0.0  0.0 38332 1904 ?        S    Mar07   0:00 sshd: can@notty   

Thanks and regards!

0

3 Answers 3

332
$ ps aux  
USER       PID  %CPU %MEM  VSZ RSS     TTY   STAT START   TIME COMMAND
timothy  29217  0.0  0.0 11916 4560 pts/21   S+   08:15   0:00 pine  
root     29505  0.0  0.0 38196 2728 ?        Ss   Mar07   0:00 sshd: can [priv]   
can      29529  0.0  0.0 38332 1904 ?        S    Mar07   0:00 sshd: can@notty  
  • USER = user owning the process
  • PID = process ID of the process
  • %CPU = It is the CPU time used divided by the time the process has been running.
  • %MEM = ratio of the process’s resident set size to the physical memory on the machine
  • VSZ = virtual memory usage of entire process (in KiB)
  • RSS = resident set size, the non-swapped physical memory that a task has used (in KiB)
  • TTY = controlling tty (terminal)
  • STAT = multi-character process state
  • START = starting time or date of the process
  • TIME = cumulative CPU time
  • COMMAND = command with all its arguments

See the ps man page for more info.

4
  • 27
    You could add e.g. that VSZ and RSS are output in KiB, not bytes as I first thought... Commented Oct 22, 2012 at 8:57
  • 1
    Can you say a little more about the differences between VSZ and RSS? Thanks.
    – Qian Chen
    Commented Jun 11, 2015 at 15:53
  • 4
    RSS is the amount of physical memory this process is using. Note that this includes any memory that's shared with other processes (eg if other processes are loaded from same executable or libraries) so it may over-report memory usage. VSZ is the size of the virtual memory space - do not be mislead by this as it's not all "used" memory. It includes memory in use (RSS), memory that's swapped, but usually the majority is just additional addressing space that hasn't actually had any real memory allocated to it - in order to use that space, more memory would need to be given to the process. Commented Jul 21, 2015 at 1:42
  • 3
    I tried to think of an analogy. Let's say you're eating dinner so you're sharing a limited supply of food with other people. RSS is the amount of food currently on your plate. VSZ is the size of your plate. Not all of your plate is food and it's not relevant to how much food you've claimed. Commented Jul 21, 2015 at 1:47
53

This might be helpful:

Process State Codes (STAT):

  • R running or runnable (on run queue)
  • D uninterruptible sleep (usually IO)
  • S interruptible sleep (waiting for an event to complete)
  • Z defunct/zombie, terminated but not reaped by its parent
  • T stopped, either by a job control signal or because it is being traced

Some extra modifiers:

  • < high-priority (not nice to other users)
  • N low-priority (nice to other users)
  • L has pages locked into memory (for real-time and custom IO)
  • s is a session leader
  • l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
  • + is in the foreground process group
0
30

In Linux the command:

ps -aux

Means show all processes for all users. You might be wondering what the x means? The x is a specifier that means 'any of the users'. So you could type this:

ps -auroot

Which displays all the root processes, or

ps -auel

which displays all the processes from user el. The technobabble in the 'man ps' page is: "ps -aux prints all processes owned by a user named 'x' as well as printing all processes that would be selected by the -a option.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .