Read this Article from Find Top Running Processes by Highest Memory and CPU Usage in Linux. This is a quick way to view processes that consumed the largest RAM and CPU
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
PID PPID CMD %MEM %CPU
414699 414695 /usr/local/ansys_inc/v201/f 20.4 98.8
30371 1 /usr/local/pbsworks/pbs_acc 0.2 1.0
32241 1 /usr/local/pbsworks/pbs_acc 0.2 4.0
30222 1 /usr/local/pbsworks/pbs_acc 0.2 0.6
7191 1 /usr/local/pbsworks/dm_exec 0.1 0.8
30595 1 /usr/local/pbsworks/pbs_acc 0.1 3.1
30013 1 /usr/local/pbsworks/pbs_acc 0.1 0.3
29602 29599 nginx: worker process 0.1 0.2
29601 29599 nginx: worker process 0.1 0.3
The -o is to specify the output format. The -e is to select all processes. In order to sort in descending format, it hsould be –sort=–%mem
Interesting.