How To Install Glances on Ubuntu 18.04 LTS

Install Glances on Ubuntu 18

Glances is a free software (licensed under LGPL) to monitor your GNU/Linux or BSD operating system from a text interface. Using it you can monitor CPU, Load Average, Memory, Network Interfaces, Disk I/O, File System spaces utilization, mounted devices, total number of active processes and top processes. There are many interesting options available in Glances. One of the main features is that you can set thresholds (careful, warning and critical) in a configuration file, and information will be shown in colors which indicates the bottleneck in the system. Glances uses the library libstatgrab to retrieve information from your system and it is developed in Python.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Glances System Monitoring on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Glances System Monitoring Features

Glances will display:

Memory information including RAM, swap, and free memory.
The average CPU load of your system.
CPU information like user related application, system programs and idle programs.
Total number of active and sleeping processes.
Download and upload rates of your network connections.
Disk I/O read and write details.
Display currently mounted disk devices.
Shows the current date and time at bottom.

Install Glances on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Glances on Ubuntu 18.04 LTS.

Run following command to install Glances:

apt-get install glances

If Glances is not available under package manager for your operating system, Use following installation script provided by Glances official team:

wget -O- https://bit.ly/glances | /bin/bash

Once installation has finished, you can launch Glances by running the following command:

glances

centos-glances

In glances you’ll see a lot of information about the resources of your system: CPU, Load, Memory, Swap Network, Disk I/O and Processes all in one page, by default the color code means:

Green: Okay
Blue: Caution
Violet: Warning
Red: Critical

When Glances is running, you can press some special keys to give commands to it:

m: Sort processes by MEM%
p: Sort processes by name
c: Sort processes by CPU%
d: Show/hide disk I/O stats
a: Sort Processes automatically
f: Show/hide file system statshddtemp
i: Sort processes by I/O rate
s: Show/hide sensors stats
y: Show/hide hddtemp stats
l: Show/hide logs
n: Show/hide network stats
x: Delete warning and critical logs
h: Show/hide help screen
q: Quit
w: Delete warning logs

Congratulation’s! You have successfully installed Glances. Thanks for using this tutorial for installing Glances System Monitoring on your Ubuntu 18.04 LTS (Bionic Beaver) system. For additional help or useful information, we recommend you to check the official Glances web site.