How to find which processes are taking all the memory?
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.
If you have it installed I like htop
once launching it you can press f6, down arrow (to MEM%
), enter to sort by memory.
In Solaris the command you would need is:
prstat -a -s size
This will list all processes in order of descending process image size. Note that the latter is based on memory committed to the process by the OS, not its resident physical memory usage.
There are supposedly versions of "top" available for Solaris, but these are not part of the standard installation.