Linux 101 : Processes - An overview of the "ps" command



Processes and the "ps" command:

Below are some examples of the options used with the "ps".

Displaying the running processes:


Displaying the running processes with the "memory" and "cpu" consumption:


Displaying also the PPID:


Showing all the processes with a "long" listing


Showing all the processes with a "full" listing:


The "eF" option shows more information that the "ef" option:


The "aux" option displays the below information:


a = means for all users
u = means the user's ID
x = displays also the detached processes - not attached to a terminal - like the system processes.

Below is a short description of the information displayed by the above commands:
  • %CPU: CPU utilization of processes
  • %MEM: RAM usage
  • RSS: Non-swapped physical memory
  • S: could have any of the below values:
          D: sleeping, can't be interrupted
          R: running
          S: sleeping, can be interrupted
          T: stopped
         W: paging
         X: dead
         Z: zombie
  • PPID: the parent process ID of the running process
  • VSZ: virtual memory
  • COMMAND: the command of the running process
  • TIME: CPU time
  • TTY: the "tty" (terminal)
  • PSR: the processor assigned to the process
  • START: the time the command started executing
  • SZ: the swap space
Customized "ps" output:

Below are a couple of examples of a "ps" customized output.

The command sorts the processes by "memory usage" and displays the fields mentioned in the command:


The below command sorts the processes by "users" and displays the fields mentioned in the command:


Comments

Leave as a comment:

Archive