Memory Usage – How to Find Which Processes Are Taking All the Memory

memoryprocesstop

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory 🙂

Best Answer

From inside top you can try the following:

  • Press SHIFT+f
  • Press the Letter corresponding to %MEM
  • Press ENTER

You might also try:

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

This will give the top 5 processes by memory usage.

Related Question