Raspberry Pi

Raspberry Pi CPU Usage Monitoring

Analysing your system performance is one of the crucial steps if you want to keep a check on your system’s health. However, you won’t get the desired monitoring without any specific software for this purpose. You will find different CPU usage monitoring tools for Windows, but finding the one for your Raspberry Pi is a little bit tricky because such tools may hinder the performance of your Raspberry Pi due to their high memory usage. Therefore, having a fast and lightweight tool for Raspberry Pi devices is what people will demand to have installed in their Raspberry Pi OS.

This article is to help you in getting used to the tools which will help you in monitoring your CPU usage on Raspberry Pi.

Raspberry Pi CPU usage monitoring

Here, you will be guided to install tools for your Raspberry Pi which will provide you with CPU usage information on Raspberry Pi. Different tools are used to monitor the Raspberry Pi’s CPU usage and we have selected the two most used tools based on their lightweight and their details are provided below.

1 : Htop

Htop is similar to a task manager in Windows OS and it works best for Raspberry Pi users. It provides you with the information about different tasks running on your system and you can analyse your CPU usage on your system screen if you achieve success in having it installed on your Raspberry Pi device. Not only it allows you to monitor your CPU usage when you have your device with you but you can also monitor it remotely due to its built-in feature.

If you are interested in installing Htop on a Raspberry Pi device, you need to open your Raspberry Pi terminal which you will find in the menu option of your Raspberry Pi.

Now, you will need to check the updates about your packages by entering the below mentioned command.

$ sudo apt update

If your packages are already updated, it will be confirmed from the above command.

Now the next step is to start the installation of Htop and you need to enter the installation command given below  which will install the Htop package on your Raspberry Pi device OS.

$ sudo apt install -y htop

As in the latest version of Raspberry Pi OS, you will get Htop automatically, so the above output which is used to install Htop on Raspberry Pi shows that you don’t need to install it on Raspberry Pi. If you are using an old version of Raspberry Pi, the above command will help you to install Htop on the device.

Now, it is confirmed that Htop is installed, you need to run it using the below mentioned command.

$ htop

As soon as you press the Enter button, you will see your CPU usage on your Raspberry Pi’s screen, which is shown below.

You can close the Htop by pressing “CTRL+C” and it will move you back to your terminal command Window.

You can also check the version of your Htop by adding the below mentioned command in the terminal and then press Enter to get the information of its version.

$ htop --v

If somehow, you want to delete Htop from your Raspberry Pi then you have to add the below given command in the terminal.

$ sudo apt-get remove htop

If you enter “Y” in the above option, it will remove Htop from your Raspberry Pi device successfully.

2: Conky

There is another utility which is best in business when it comes to monitoring your CPU usage and that one is with the name of Conky. It’s a free program that allows you to keep a check on your CPU performance on your desktop screen with having to open it again and again on the Raspberry Pi terminal. You will have it on your desktop all the time while you can do your other task without any worry. So, if you don’t need the service of Htop, you can install Conky on your Raspberry Pi OS and it will let you keep monitoring CPU usage on the go.

In order to install Conky, you need to write the below mentioned command-line in the terminal and then press enter to begin the installation of Conky.

$ sudo apt install conky

When you type “Y” and press Enter, it will install Conky on your device OS in a few seconds. You can run it by entering the name “conky” in the terminal.

$ conky

You can remove Conky by using the below given command.

$ sudo apt-get remove

If you enter “Y”, Conky will be successfully removed from your Raspberry Pi.

Conclusion

If you have a plan to monitor your CPU usage on Raspberry Pi then you should definitely choose any program mentioned above. Two programs are primarily used to monitor the CPU usage on Raspberry Pi; through Htop and through Conky extension. Both utilities are especially designed to monitor CPU usage on Raspberry Pi and have their own usages and advantages.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.