How to Install and Use Glances to Monitor the Ubuntu 22.04 System
First, update and upgrade your Ubuntu system through the following commands:
sudo apt upgrade -y
Usually, Ubuntu 22.04 comes with the Glances as the default package. This means that you can install it using the following command:
Now, run the following command to enable and start the Glances:
sudo systemctl start glances
You can also check the status of the currently running Glances through the following command:
As the previous image shows, the system displays “Active” for Glances. If you want to check the version of Glances, run the following command:
If the previous commands do not enable the Glances, you can run the following command to enable it immediately:
You can run the following command to start the Glances from the terminal:
Next, you can open the Glances through the timer which might aid the systems during demanding jobs. The timer is set at 1 by default, but you can alter it. For instance:
Instead of the default time delay being 1 second, it is now 4 seconds.
Alerts in Glances
Glances have the color for alerts. Here is a list of colors with their details:
Colors | Description |
---|---|
Green | OK (Good) |
Blue | CAREFUL (Attention) |
Violet | WARNING (Alert) |
Red | SEVERE (Critical) |
The default settings’ thresholds are as follows:
Warning | Details |
---|---|
Careful | 50 |
Warning | 70 |
Critical | 90 |
You can alter the setup from the default by editing the following:
Now, add or edit the following lines in the files:
When you’re done, save and close the file. If you want to know more about Glances, run the following-given command:
How to Run the Glances in a Web Browser
Glance also supports the web interface which you can run the following command:
When you enter this command, the terminal displays “Glances Web User Interface started on http://0.0.0.0:61208.” Using the server’s IP address may make this perplexing.
You can use the following command to keep Glances running in the background for your primary client:
To end all active glances sessions, type the following to finish the processors in the background mode:
Conclusion
The Glances is one of the more prevalent alternatives for straightforward server monitoring due to the added benefit of remote monitoring. With an ongoing, active development, things keep becoming better. This is how you can easily install and use Glances in Ubuntu to monitor everything without effort.