One such tool is called htop. The htop utility is an interactive process viewer for Linux. Similar to top, it shows resource usage of individual Linux processes in ncurses-driven text mode, but in much more user-friendly fashion.
To install htop on Ubuntu or Debian:
To install htop on CentOS, RHEL or Fedora, first configure EPEL repository on your system, and then run the following.
To run htop, simply run:
The screenshot of htop command is shown above. At the top of the screenshot, you can see the overall resource usage of the system: CPU usage (labeled "1" for the first CPU, "2" for the second CPU, etc.), memory usage and swap space usage. The rest information is similar to the output of top utility.
If you want to sort processes by memory usage, press <F6>, and choose "MEM%".
With htop command, you can check a complete list of processes as opposed to top-N processes, by scrolling up/down the list. You can also scroll horizontally to see complete command line information of individual processes.
By toggling <F5>, you can enable or disable process tree views as shown below.
Besides keyboard, htop responds to mouse clicks as well. This is convenient when you nice or kill specific processes.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to install Suricata intrusion detection system on Linux - September 3, 2015
- How to switch from NetworkManager to systemd-networkd on Linux - August 31, 2015
- How to set up a system status page of your infrastructure - August 25, 2015