Using htop to monitor system processes on the Raspberry Pi
If you work a lot on the command line you are probably familiar with the top utility to see what process is taking the most CPU or memory. There’s a similar utility called htop that is much more powerful. On top of the information that top provides, htop additionally shows your usage per CPU, as well as a meaningful text graph of your memory and swap usage right at the top.
As if that wasn't enough, you can just use your up/down arrow keys to select a process, and then you can kill it with the F9 key if you like, or you can change the priority by using the F7 and F8 keys.
To install htop simply use
$ sudo apt-get install htop
Once installed you can start it using