Monitor your unix system resources using HTOP.

Monitor your unix system resources using HTOP.
5 (100%) 3 votes

When it comes to servers it is really important to keep track of memory, cpu utilization, which processes are taking what amount of CPU, what process are orphan processes etc. All these are required to take necessary step like kill a process if it is taking a lot of CPU or trigger autoscaling when CPU usage is above a threshold value. Thus let us see how to monitor your unix system resources using HTOP.

Monitor your unix system resources using HTOP.

Installation

sudo apt-get install htop

Usage

Just type htop in terminal and you will be able to see screen like the one below. 

Monitor your unix system resources using HTOP.

As you can see from the top left 1 2 3 and 4 are the cores of the CPU and its showing how much they are utilized. 

Next it shows the memory usage by the system. You can also see total tasks, average load, battery and uptime of the systems.

Next in the list you can see all the process running with their process id CPU utilization memory time and resources. Thus you have info if any process if making your system unresponsive from these details.

So next what to kill that process right.

For that press F9 when you press F9 you will se screen like the one below.

Monitor your unix system resources using HTOP.

Here on the left hand side you will get the list of signals you want the app to send after it is killed. Now press the number key corresponding to signal and the process will be killed.

Now lets say you want to search for the process, press F4 and type the substring and it will search the process for you like below. 

Monitor your unix system resources using HTOP.

Look at the bottom there is text called filter after that is the text what we search for. Now that you get the process you can again press F9 if you want to kill the process. This is how htop is very useful.

Need more options for htop type the below command and you will see those.

man htop

 

This is the end of the article Monitor your unix system resources using HTOP. Liked the article please share and subscribe.

Also read about increasing performance of python code here.

 

 


Gaurav Yadav

Gaurav is a Full Stack Web Developer and Blogger. Sportsperson by heart and loves football. He has experience with various frameworks in php, python and javascript. Loves to explore new frameworks and evolve with the trending technology.

4 COMMENTS
  • Creating Linux alias to enable you work faster. - Learn Steps
    Reply

    […] thing is you need to monitor the system for which we need either top or htop. Lets write an alias for […]

  • Nds emulator android
    Reply

    Thanks for your personal marvelous posting! I quite enjoyed reading it, you may be a great
    author.I will make certain to bookmark your blog and will often come back at some point.
    I want to encourage you continue your great posts, have a nice weekend!

    1. Gaurav Yadav
      Reply

      Thanks for the encouragement. Your words really meant alot to me.

  • Command to get top ten processes consuming most CPU - Learn Steps
    Reply

    […] can also use tools like htop for better process […]

Leave a Reply

Your email address will not be published. Required fields are marked *