HTOP Monitoring Tool
Monitoring Linux with htop tool
htop for Linux
Htop is an alternative monitoring tool to the more familiar top command. With htop, you are greeted with a colourful screen displaying CPU Utilisation, Memory Utilisation and Swap file utilisation in a graphical format. Across the top, the current number of running tasks, Load average and up times are displayed.
Underneath this graphical display is a more familiar view which resembles top in many ways. However, you can move your cursor up or down over the running process and quickly change the priority (Nice + / Nice -) with the 'F7' or 'F8' keys or Kill a process with the 'F9' key. Pressing the 'F6' key gives you the option to amend the fields that are displayed.
To use 'htop', you will need to download the appropriate set of binaries from for your system. (Many linux distributions already have htop in the repositories). Debian, Ubuntu, OpenSUSE have these packages available. Under Ubuntu and Debian, you can simply run the "sudo apt-get install htop" command. Under CentOS and RHEL you will need to download the rpm that matches your system and issue the appropriate "rpm -ihv htop-1.0-1.el6.rf.x86_64.rpm" command with the appropriate rpm package for your installation.
Download binaries and source code available here: htop Download Page
Example installation running OpenSUSE Linux
The following installation was carried out using zypper. First, I checked that the htop package was available by issuing a search. Once I had confirmed the package was available, I then issued the "zypper install htop" command.
linux-pd5y:~ # zypper se htop Loading repository data... Reading installed packages... S | Name | Summary | Type --+------+---------------------------------------------------+-------- | htop | An Interactive text-mode Process Viewer for Linux | package linux-pd5y:~ # zypper install htop Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW package is going to be installed: htop 1 new package to install. Overall download size: 63.0 KiB. After the operation, additional 141.0 KiB will be used. Continue? [y/n/?] (y): y Retrieving package htop-0.9-16.1.3.i586 (1/1), 63.0 KiB (141.0 KiB unpacked) Retrieving: htop-0.9-16.1.3.i586.rpm [done (0 B/s)] Installing: htop-0.9-16.1.3 [done]
Once htop has installed successfully, you can start the monitor by typing htop on your terminal. A screen similar to the one shown should now be displayed. The upper area may look different on your system if you have a multi core CPU system.
htop short cut and Function keys:
h - F1 - Help Screen
S - F2 - Setup Screen
/ - F3 - Search for a Process
| - F4 - Filter
t - F5 - Process Tree View
> - F6 - Sort by Column
[ - F7 - Nice - (Priority)
] - F8 - Nice + (Priority)
k - F9 - Kill (Process)
q - F10 - Quit htop Application
To access the Help Menu simply press "h". Here you will find a short description of what each key does.
htop Video Demo of basic functionality
Below is a quick overview of some of the basic functionality found within the htop monitoring tool.