Friday, 26 April 2013

How to find top 5 process which are using more memory in linux

One of my friend asked this question in a company

use below command to find top n process which are using more process



ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -5


here e --- means every process i.e all process
       o --- optional format
       k --- memory in killo bytes
       n --- sorting on number
       r --- revert the sort i.e descending order

No comments:

Post a Comment