Thursday, May 20, 2010

Command to find top process utilizing CPU/Memory in Linux

Command to find top 5 process utilizing more memory

$ ps -eo pmem,pid -o comm | sort -k1nr | head -5

Command to find top 5 process utilizing more cpu resource

$ ps -eo pcpu,pid -o comm | sort -k1nr | head -5