Tip: show process sorted by RSS
Several times I needed a way to quickly see which process are using the most memory on a Linux system. After reading a bit of the man page and with a tip from the Apache performance article I was reading, I settled for this:
ps ax -yl --sort:rss (BSD syntax)
ps -eyl --sort:rss (standard syntax)
There you go.
Update: corrected the command, thanks to Daniel Fonseca. I messed up BSD syntax (which I prefer) with standard syntax. I included both versions.
Thanks Daniel.
Update: To clarify, this is in a Linux system. On my Mac, the better I was able to do with standard ps
command was:
ps alwxm
Not as good, specially because the results are sorted in descending order.