HTOP – A Nifty Tool to Monitor Linux System Performance

Linux Administrator’s can’t run even a single day without using Top Command when they are in office because whenever system load is more our fingers automatically type TOP command in terminal without asking us.

Most-of us are not familiar with Htop command because every time we use top command, but htop have many of features and options compared to top command.

htop is an interactive process viewer for Linux which was developed by Hisham using ncurses library.

Alternatively you can monitor system IO activiy using iotop & iostat commands.

Advantage’s of HTOP command

  • You can use mouse to interact with htop command
  • Scroll the list vertically and horizontally to see all processes which are currently running
  • Use Arrow, page up, page down keys to scroll
  • Htop kill’s process automatically without PID
  • Htop is Very fast

1) Install Htop

Follow the below steps to install Htop in linux. For CentOS/RHEL/Fedora you need to Enable EPEL repository because their official repository doesn’t have Htop package.

# Install Htop on Ubuntu/LinuxMint/Debian #
$ sudo apt-get install htop

# Install Htop on CentOS/RHEL/Fedora 21 & older systems #
# yum install htop

# Install Htop on CentOS/RHEL/Fedora 22 & later systems #
# dnf install htop

2) Htop Output

See the below standard output for Htop command. Htop output can be considered as three parts (Header, Body & Footer).

  • Header : Header shows the CPU usage, Memory usage, Swap usage, Load average and uptime of system.
  • Body : Body shows the list of processes that are currently running.
  • Footer : Footer shows htop menu option.


3) Sorting Htop Output

By default Htop sortes the output by CPU usage. If you want to sort the output with different options like Memory, PID, etc., You can do this by pressing F6 key. I’m going to sort the output by Memory.
See, now the below output is sorted by Memory.

4) Tree View

In default view you can see the Parent process in command section. Sometime that’s not enough to find the root causes and you want to see the child processes of a parent process, you can do this by pressing F5 key.

5) How to Kill the process

Just select the process which you want to kill and Press F9 key then you will get option to enter the signal to complete the process. I’m going to kill MySQL process.

6) How to search the process

By Pressing F3 key you will get search prompt at the bottom of the screen. Simply type the item which you want to search then hit Enter. I’m going to search oracle process.

7) Htop Help

By Pressing F1 key, you can see all the htop options and usages.

8) Customize Htop output

By Pressing F2 key you can Customize the Htop output.
Here after i will use Htop, its amazing…You can also give a try…Enjoy the week…)

Prakash Subramanian

Prakash Subramanian is a Linux lover and has 3.5+ years of experience in linux server administration with major Linux distribution such as (RHEL, CentOS, Ubuntu). He is currently working as a Senior L2 Linux Server administrator.

You may also like...