Ubuntu show CPU and Memory usages in Top Bar

Ubuntu includes many commands and applications to monitor and track the usage of system resources. However, they display information at the command prompt or in their Windows. If you want to collect system information for reporting and monitoring purposes, these utilities are fine and do their job perfectly. However, if you need real-time information for troubleshooting, you can use the indicator-multiload application.

The indicator-multiload application provides real-time information about resources. It displays information on the top bar as a notification. The following table lists the differences between regular system monitoring tools and this tool.

System monitoring and tracking toolsThe indicator-multiload application
These tools usually provide static information.This application provides real-time information.
You can store the output of these tools as text files.You can not store the output of this application.
These tools usually provide information at the command prompt or in Windows.This application provides information in the top bar as a notification.
Most of these tools are part of the default installation.It is an add-on application. You need to install it manually.
For reporting and tracking purposes, these tools are the best.For monitoring and troubleshooting purposes, this is a perfect option.

Installing indicator-multiload application

Installation of the indicator-multiload application is simple. It requires only one command. Connect the system to the Internet, open a terminal, and run the following command.

$sudo apt install indicator-multiload

Authenticate the installation process with your login password.

apt install indicator-multiload

Starting application

Click Dash (Application launcher) and search system Load Indicator in the search box. From the search results, click the System Load Indicator application.

system load indicator

By default, this application shows information in graph format.

indicator multiload

Right-click the notification panel to view the detailed information in text format.

indicator in text format

Customizing application

To customize it, click Preferences from the right-click menu.

customize tool

It brings the main window of the application. The main window contains three sections: Monitored resources, Options, and Colors.

Monitored resources

This section allows you to select the resources you want to monitor. By default, it only monitors CPU usage. If you need to monitor other resources, you can add them here.

Option Monitor
Processor CPU usages
Memory RAM usages
Network Network Bandwidth speed
Swap Space Swap space usages
Load Waiting processes
Hard disk Read and write speed

Options

This section contains three options: Auto start, System monitor width, and System monitor update interval.

Auto start

If we turn on this option, the application automatically starts when Ubuntu starts.

System monitor width

This option allows us to adjust the width of the notification panel in the top bar.

System monitor update interval

This option allows us to adjust the time interval between two continuous updates.

Colors

This section has two options: Built-in schemes and Color palettes.

Built-in schemes

This option allows us to select the color scheme for the notification panel from some pre-customized color schemes.

Color palette

This option allows us to change the color of a single indicator or all indicators individually in the selected color scheme.

default option

At the bottom of the main window, there are three buttons: Advanced, Menu items, and Indicator items.

Advanced

This option allows us to customize the graph indicators. It divides options into two panes. The left pane contains a list of all resources you can monitor by this application. The right pane displays the options you can customize for selected resources in the left pane. To monitor a resource in graph format, select it from the left pane and toggle the visible button to ON in the Graph section of the right pane. By default, the application enables it for all resources.

advanced option

If you want to monitor resources for troubleshooting purposes, use the text format instead of the graph format. It provides information descriptively.

Menu items

This option allows us to customize the menu opened when we click the notification panel. This window also divides options into two panes. The left pane shows a list of currently monitored resources by this application. The right pane contains five control buttons: Add, Remove, Edit, Up, and Down.

By default, this application only monitors usages of CPU, Memory, Network (bandwidth), Swap, Load, and Disk (read/write speed). If you want to monitor a additional resource, add that through the Add button.

If you do not want to monitor a resource anymore, select that resource from the left pane and click the Remove button. The Edit button allows us to add any additional functionality or remove current functionality from monitoring for a resource. For example, by default, this application tracks the downloading and uploading speed of the network. If we want to track only the downloading speed, we can remove uploading speed from monitoring. For this, select network indicator [Net:down$(speed(net.down)),up$(speed(net.up))] from the left pane and click Edit and remove the command which tracks uploading speed [up$(speed(net.up))].

The Up/Down buttons allow us to adjust the order of indicators. For example, if we want to display the Memory usage before the CPU usage, we can do that through these buttons. Select the Memory indicator from the left pane and click the Up button. It will put the Memory indicator above the CPU indicator.

Whatever changes we make in this window, applies in the right-click menu box.

menu items

Indicator items

Like the previous two buttons, this button also opens a new window. This window looks like previous windows except for the first line of the left pane. By default, in this window, the first line of the left pane is blank. The first line of left pane represents the notification panel. Whatever indicator we put in the first line shows its output in the notification panel.

indicator option

To view the text notification of any indicator in the notification panel, select that indicator and click the Up button to move that to the first line. For example, to view the current CPU usage in the top bar as a notification, select CPU indicator [(CPU $(percent(cpu.inuse))] in the left pane and click the Up button.

cpu usage

We can also put multiple indicators in the first line. For example, to view the current CPU and Memory usage in the top bar as a notification, select the first line, click the Edit button, and insert the Memory indicator just after the CPU indicator.

cpu usages

After adding the necessary indicators, click the Close button twice (first to close the child window and second to close the main window) to apply the changes.

Uninstalling application

The following command uninstalls this application.

$sudo apt-get remove indicator-multiload

Authenticate the remove active by typing your login password.

apt-get remove indicator-multiload

Conclusion

As a system or network administrator, you monitor the system resources for debugging and troubleshooting. In this tutorial, I explained how you can view the usage of system resources in real-time.

ComputerNetworkingNotes Linux Tutorials Ubuntu show CPU and Memory usages in Top Bar

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com