In our earlier series of system monitoring article where we explained about Iotop (Monitor Linux Disk I/O) tool, now today we are so exciting to install another system process monitoring tool called Htop on our CentOS 6.3 box to see how it works. It should work on RedHat/Fedora as well. I had heard that htop is replacement of Unix/Linux Top command. I have installed it one of our box and became fond of it. You too can try it out and share your experience with us through comment. Start installing htop and play with it.
What is Htop?
Htop is an interactive and real time process monitoring application for Linux. It shows complete list of processes running and easy to use for normal tasks. We can interact with mouse those who love to play with mouse. You can scroll vertically to view the full process list, and scroll horizontally to view the full command line of the process.
Install Htop for RHEL, CentOS & Fedora
Let us install Htop on RHEL 6.3/6.2/6.1/6/5.8, CentOS 6.3/6.2/6.1/6/5.8 and Fedora 17,16,15,14,13,12 Linux via the yum package manager, the rpmforge package repository must be installed on your system to retrieve and install. To do just install the following RPM for your architecture (32bit or 64bit).
For RHEL, CentOS & Fedora 32-bit OS
## For RHEL 5, CentOS 5 & Fedora ## # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm # rpm -ihv rpmforge-release*.rf.i386.rpm ## For RHEL 6 and CentOS 6 # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm # rpm -ihv rpmforge-release*.rf.i686.rpm
For RHEL, CentOS & Fedora 64-bit OS
## For RHEL 5, CentOS 5 & Fedora ## # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm # rpm -ihv rpmforge-release*.rf.x86_64.rpm ## For RHEL 6 and CentOS 6 # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm # rpm -ihv rpmforge-release*.rf.x86_64.rpm
Once RPMforge repository is installed. Now start installation with yum command.
# yum install htop
Now run the htop monitoring tool by executing following command on the terminal.
Htop is having three sections mainly
- Header, where we can see info like CPU, Memory, Swap and also shows tasks, load average and Up-time.
- List of processes sorted by CPU utilization.
- Last footer shows different options like help, setup, kill, nice , quit etc.
Press F2 or S for setup menu > there are four columns i.e Setup, Left Column, Right Column and Available Meters.
Type tree or t to display processes tree view.
We can refer footer for function keys to use nifty htop application. However, we advise to use character keys or shortcut keys instead of function keys as it may have mapped with some other functions during secure connection.
Htop Shortcut and Function Keys
Some of the shortcut and function keys and its functionality to interact with htop.