This article deals with system process and resource allocation monitoring. Htop is external tools available for various Linux packages. For demonstration i am using Ubuntu 14.10 as Linux distribution.
Htop is process monitoring tool and alternative for “Top” command for Linux. Top command is used to show the current process and resource allocation of system while Htop does the same but with more features. We recommend Htop for system administrator as well as for developers out there.
In this article i am going to cover as much information i can to help you to make best out of this awesome tool.
Installation part is very easy. Open up your terminal and executes following command.
For ubuntu and debian packages:
For CentOS/Fedora/Red hat enterprise packages:
Once installation is over, just type htop in terminal and you should see following screen.
Default configuration of htop shows resource utilization ( uses of Ram etc ) on top-left and list of all process on bottom. if you want you can change the screen layouts according to your need by pressing F2 and changing the layout using arrow keys.
You can navigate through processes by arrow keys and best part is you can even kill the process and its tree by pressing F9 ( if you run it as sudo ) also you can prioritize process by pressing F7 or F8 key.
This is another awesome feature of htop. Process used to run in dependency and also there are some threads which run inside process. To know those details tree view helps a lot. Just press F5 and observe the screen.
Searching / Filter / Sorting :
Htop allows you to search in the system process and gives you most relevant result. This is interactive so you don’t have to put keyword, hit enter and wait for result. Press F3, type in what you are looking for and it will highlight the found matches.
Filter is one of the feature which i use a lot. You can filter whole process list according to your need. For example most of my time i work around Node.js and i only want to see process related to my node Server. So i filter it like this. Press F4 and type “node server.js”. it shows the result right away.
You can sort processes by various parameters such as PID,USER,PRIORITY etc. Press F6 and select the parameter shown on left.
You can close the application using F10 key.
Htop is really one of the best and helpful tool in my knowledge. If you deal with Linux and find Top really annoying to search and kill processes then Htop is the tool you must give a try.