1. Overview
Sometimes, we need to monitor CPU usage to optimize system performance and diagnose potential issues on our Linux desktop. For example, this task is essential in different scenarios such as getting real-time insights for efficient resource utilization or troubleshooting performance-related issues.
In this tutorial, we’ll check out methods to add a CPU usage percentage statistic to the menu bar on our Linux desktop using the System Load Indicator application and GNOME shell extensions such as simple-monitor-next, TopHat, and Simple monitor.
These methods have been tested in an Ubuntu 22.04 GNOME desktop environment.
2. Using the System Load Indicator Application
The System Load Indicator tool is primarily used to display a graphical representation of different system metrics, such as CPU, memory, and network usage, on the menu bar of a Linux desktop. Moreover, it offers us real-time insights into how our system resources are utilized.
However, in this case, we’ll use the System Load Indicator application to add CPU usage percentage to the menu bar of our Linux system.
2.1. Installing the System Load Indicator Application
First, we open our terminal and install the System Load Indicator application with apt:
$ sudo apt install indicator-multiload
After successful installation, we open the Activities menu, type System Load Indicator, and open it:
As a result, we can see the System Load Indicator on our menu bar:
Currently, the System Load Indicator shows the CPU usage in a graph format. However, to display it in percentage, we can modify some application settings.
2.2. Configuring the System Load Indicator Application
To configure the System Load Indicator application, we right-click on its icon from the menu bar, and select the Preferences option:
After that, we click on the Indicator items… button from the bottom of the current window:
Next, we select the CPU $(percent(cpu.inuse)) entry and click on the Up button to move it to the top of all entries:
Now, we check the menu bar of our desktop to notice the result:
As a result, the System Load Indicator shows the CPU usage in percentage on the menu bar of our Linux desktop.
3. Using GNOME Shell Extensions
On Linux, we can also use different GNOME shell extensions to add a CPU usage percentage to the menu bar of our Linux desktop. Additionally, we can employ the Extension Manager to manage such extensions.
To do so, first, we install Extension Manager on our Linux system:
$ sudo apt install gnome-shell-extension-manager
Consequently, Extension Manager helps us to enable and disable the installed extensions.
Now, let’s check out some GNOME shell extensions to add CPU usage percentage to the menu bar of our system.
3.1. Installing the simple-monitor-next Extension
The simple-monitor-next extension displays system information, such as network rates, memory, CPU, storage, and battery usage, on the menu bar of a Linux desktop. Moreover, we can use it to show the CPU usage specifically in the percentage format.
Before moving to the simple-monitor-next installation, we first install some packages as pre-requisites:
$ sudo apt install gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 gnome-system-monitor
Next, we visit the simple-monitor-next GNOME shell extension page in our browser (Chrome in this case) and click on the toggle to turn it on:
Then, we click on the Install button to download and install system-monitor-next on our system:
Consequently, the system-monitor-next extension starts and displays the system metrics information on our menu bar:
However, to display only the CPU usage in percentage, we right-click on the system-monitor-next icon and select Preferences from the context menu:
Then, we switch to the Cpu tab and set digit as the Display Style of the CPU usage information:
Moreover, we can also hide other details such as memory and network usage from the menu bar.
For this, we first switch to the Memory tab and uncheck the Display box:
Likewise, we hide the network details or Net from the menu bar:
Let’s check the result:
Now, we can only see the CPU usage in the percentage on the menu bar of our Linux desktop:
3.2. Installing the TopHat Extension
TopHat is another well-known GNOME extension used to monitor system resources. In particular, it displays memory, CPU, network, and disk activity on the menu bar of a Linux system.
However, we’ll use TopHat to only display the CPU usage in percentage on our system’s menu bar.
For this, we visit the official TopHat GNOME extension page and turn on its toggle:
Then, we click on the Install button to start the installation of the TopHat extension:
Consequently, the TopHat extension shows the system resources information on the menu bar:
However, to display only the CPU usage in percentage, we right-click on TopHat from the menu bar and click on the gear icon to open its Settings:
Then, under the Processor settings, we look for Show as drop-down menu and select the Numeric value option:
In addition, we also hide the Memory, Disk, and Network details:
Again, let’s check the result:
Thus, the TopHat displays only the CPU usage in percentage on the menu bar of our Linux desktop.
3.3. Installing the Simple Monitor Extension
On Linux, the GNOME Simple monitor extension displays CPU and RAM usage in the percentage format. Moreover, it also shows the top ten processes that are currently using CPU and memory.
Here, we’ll use the Simple monitor extension to view CPU usage in the percentage format.
For this, first, we visit the official Simple monitor GNOME extension page and turn on its toggle:
Then, we click on the Install button to start the Simple monitor installation:
After installation, Simple monitor displays CPU and memory usage in the percentage on our menu bar:
For further configuration, we right-click on Simple monitor from the menu bar and open its Settings:
Moreover, we can also configure Show memory percentage, Get processes CPU usage from ‘top’, and Update every (Sec) time settings:
As a result, the updated settings reflect the information that the Simple monitor extension displays on our Linux desktop menu bar.
4. Conclusion
In this article, we explored several methods to add the CPU usage percentage to the menu bar on our Linux desktop. These methods included the System Load Indicator application and GNOME shell extensions such as simple-monitor-next, TopHat, and Simple monitor.
First, we installed and used the System Load Indicator application to visualize diverse system metrics on the menu bar, including the CPU usage in percentage. Next, we tried some user-friendly GNOME shell extensions such as simple-monitor-next, TopHat, and Simple monitor to customize the view of the CPU usage in the percentage format on the menu bar of our Linux desktop.
However, we should keep in mind that the availability of these GNOME shell extensions or their compatibility with other desktop environments might vary.