Htop is a text-mode, interactive process viewer for Linux run via console/ssh, and to install htop in CentOS / Ubuntu is a pretty simple task.
Among other things,
This way you will notice what programs is using most RAM.
htop allows you to:
quickly view key performance statistics such as CPU(multi-core layout) and Memory/Swap usage;
scroll the process list vertically and horizontally to see all processes and complete command lines;
kill processes by selection rather than entering process number;
use mouse to select list items.
Centos / Redhat
yum install rpm
Ubuntu / Centos
sudo apt-get install htop
How to Use htop
in the terminal
also there are some other options for example the delay time that is -d
# htop -d 2
That the above will delay the refresh time to 2 seconds