Find the processes eating your memory

The server is swapping. Who's responsible?

SNP 062 #295 Filed cmd linux

shell
ps aux --sort=-%mem | head -n 10

The same for CPU:

shell
ps aux --sort=-%cpu | head -n 10

For a live view top does it: press M to sort by memory, P for CPU, k to kill the selected one. htop is nicer if you can install it.

And the total picture:

shell
free -h

Don't panic about a small free column; Linux uses spare memory for caches and gives it back when needed. available is the number that matters.