Archive for: ‘September 2012’

Viewing running process sorted by memory

September 5, 2012 Posted by admin

Recently while trouble shooting an issue I needed to come up with a quick and easy way to find how much memory each running process was using.


ps -eo pid,ppid,rss,vsize,pcpu,pmem,cmd -ww –sort=pid
for PID in /proc/[0-9]* ;
cat “$PID/cmdline”;
echo -n “–>”;
cat $PID/status | grep -E VmRSS;