ps

The ps (process status) command produces a list of processes on the system that can be used to determine how long a process has been running, how much CPU resource processes are using, and if processes are being penalized by the system. It will also show how much memory processes are using, how much I/O a process is performing, the priority and nice values for the process, and who created the process.

The ps command has a variety of options. Helpful ps commands  shows some helpful ps commands.

Helpful ps commands

Action Command
To display the top 10 CPU consuming processes. ps aux | head -1 ; ps aux | sort -rn +2 | head -10
To display the top 10 memory consuming processes. ps aux | head -1 ; ps aux | sort -rn +3 | head
Note: 10 is the default value for the head command.
To display the top 10 memory consuming processes by sz (virtual size in kilobytes of the data section of the process). ps -ea1f | head -1 ; ps ea1f| sort -rm +9 | head
To display the processes in order of being penalized by the Virtual Memory Manager (sorted by the C column). ps -eak1 | head -1 ; ps eak1| sort -rn +5
To display the processes in priority order. ps -eak1 | sort -n +6 | head
To display the processes in nice order ps -eak1 | sort -n +7
To display the processes in CPU time/utilization order. ps -vx | head -1 ; ps vx| grep -v PID | sort -rn +3 | head -10
To display the processes in order of real memory usage. The RSS value is the size of the working segment and the code segment in 1 kilobyte blocks. ps -vx | head -1 ; ps vx| grep -v PID | sort -rn +6 | head -10
To display the processes in I/O order. PGIN represents the number of page ins caused by page faults. All AIX I/O is classified as page faults. ps -vx | head -1 ; ps vx| grep -v PID | sort -rn +4 | head -10