When troubleshooting your server, sometimes the biggest problem is finding the problem. If something is going wrong, and you’re not sure what the problem is, the htop Linux command can help you figure out what’s going on. Read below for more tips on installing and using htop on your server.
What is the Htop Linux Command?
The htop command line tool is very useful for locating what programs are using up more resources than intended. Unlike the top command, htop will provide all of the processes running and not just the top resource abusing ones. Htop provides many filters that you can sort through to show only the information you are looking for. For example if you are running htop and you would like to view the programs using the most RAM, you would hit F6 on your keyboard and select the MEM% filter then hit enter.
How to Install Htop
Note: check your server before installing htop. It comes pre-installed on most of our Shared Hosting and Shared Reseller plans!
- Log into your server with root access via SSH
- Add the htop repository to your servers repo list:
wget dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm -ihv epel-release-7-11.noarch.rpm - Install htop with
yum install htop
- Once the installation is complete you may just run the command
htop
to get started.
How to Use Htop
Once you have htop up and running you should see something similar the image above. As you can see in the image to the right HTOP displays how many cores your computer/server has while also including the load on each core. Below your CPU information you can see the RAM being used and the total amount. You can also run the command “man htop” and it will provide you with more options while running this tool.
If you are a reseller, htop is especially useful. If one of your customers is using up too many server resources, you can easily figure out who and what is causing the issue. Plus, since htop shows every process and not just the top ones, you can more easily locate unusual activity.
Hello,
Any update on where and what package to use now? The CentOS wiki says “RPMForge/RepoForge is a dead project. It is not maintained. DO NOT USE”
Thanks!
Thanks for the feedback. We will update this article to reflect the changes you’ve mentioned. At the moment, it is recommend to use the EPEL repository for the latest version of Htop.