Installing Glances on Linux
What is Glances System Monitoring?
Glances is a really cool Linux monitoring tool written in Python and available on nearly all Linux Distributions. The project’s full title is Glances – an eye on your system, and it is a popular Github project written by NicoLargo and maintained by the community.
It is a great tool for monitoring a server. It gives detailed information about CPU, MEM, DISK, and server performance, it can also be hosted as a webserver which is a great feature, allowing system administrators to give developers real-time monitoring of a platform during upgrades or peak season.
Click here for GitHub site.
How to install Glances on CentOS 7 / Red Hat 7 / Red Hat 8 / Rocky Linux
Here is a quick guide to installing Glances in CentOS 7.
Step 1 – Install the Pre-Reqs
It is recommended to complete a yum update before proceeding; this ensures that any dependencies are at the right level.
yum update -y
Next install wget if you do not already have it
yum install wget -y
Step 2 – Add the Fedora Repo That Contains Glances
Add the fedora repo to CentOS – this is not a default repository so you have to manually add it.
wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
Install the package with RPM.
rpm -ivh epel-release-7-11.noarch.rpm
Step 3 – Install glances
yum install glances -y

Step 4 – Start Glances
glances


How to install Glances on Ubuntu / Debian
Step 1: Update the Package List
Before installing any new software, it’s a good practice to update the package list to ensure you are installing the latest version. Open a terminal and run the following command:
sudo apt update
Step 2: Install Glances
Next, install Glances using the following command:
sudo apt install glances
Step 3: Verify the Installation
After the installation is complete, you can verify that Glances was installed correctly by running the following command:
glances -V
This command should return the version of Glances that is currently installed on your system.
Step 4: Run Glances
Now, you can run Glances to monitor your system. Use the following command to start Glances:
glances
This will open the Glances interface, where you can monitor various system metrics such as CPU usage, memory usage, disk usage, and more.
Step 5: Exploring Additional Options
Glances offers several additional options and features. You can explore these by using the help command:
glances -h
This command will display a list of all the available options and how to use them.
Step 6: Installing via Python Pip (Optional)
Alternatively, you can install Glances using pip, the Python package installer. First, install pip with the following command:
sudo apt install python3-pip
Next, install Glances using pip:
sudo pip3 install glances
This method can be used if you want to install a newer version of Glances that may not be available in the Ubuntu repositories.
Requirements
python 2.7,>=3.4
psutil>=5.3.0
(better with latest version)
Optional dependencies:
bernhard
(for the Riemann export module)bottle
(for Web server mode)cassandra-driver
(for the Cassandra export module)couchdb
(for the CouchDB export module)docker
(for the Docker monitoring support) [Linux-only]elasticsearch
(for the Elastic Search export module)hddtemp
(for HDD temperature monitoring support) [Linux-only]influxdb
(for the InfluxDB export module)kafka-python
(for the Kafka export module)netifaces
(for the IP plugin)nvidia-ml-py3
(for the GPU plugin)pika
(for the RabbitMQ/ActiveMQ export module)potsdb
(for the OpenTSDB export module)prometheus_client
(for the Prometheus export module)py-cpuinfo
(for the Quicklook CPU info module)pygal
(for the graph export module)pymdstat
(for RAID support) [Linux-only]pySMART.smartx
(for HDD Smart support) [Linux-only]pysnmp
(for SNMP support)pystache
(for the action script feature)pyzmq
(for the ZeroMQ export module)requests
(for the Ports, Cloud plugins and RESTful export module)scandir
(for the Folders plugin) [Only for Python < 3.5]statsd
(for the StatsD export module)wifi
(for the wifi plugin) [Linux-only]zeroconf
(for the auto-discover mode)
Glances interactive command list
Sort process list automatically
- If CPU
>70%
, sort processes by CPU usage - If MEM
>70%
, sort processes by MEM usage - If CPU iowait
>60%
, sort processes by I/O read and write
A
– Enable/disable Application Monitoring Process
b
– Switch between bit/s or Byte/s for network I/OB
B – View disk I/O counters per second
c
– Sort processes by CPU usage
d -
Show/hide disk I/O stats
D -
Enable/disable Docker stats
e
– Enable/disable top extended stats
E
-Erase the current process filter
f
-Show/hide file system and folder monitoring stats
F
– Switch between the file system used and free space
g
– Generate graphs for current history
h
– Show/hide the help screen
i
– Sort processes by I/O rate
I
– Show/hide the IP module
l
– Show/hide log messages
m
– Sort processes by MEM usage
M
– Reset processes summary min/max
n
– Show/hide network stats
N
– Show/hide the current time
p
– Sort processes by name
q|ESC|CTRL-C
– Quit the current Glances session
Q
– Show/hide the IRQ module
r
– Reset history
R
– Show/hide the RAID plugin
s
– Show/hide sensors stats
t
– Sort process by CPU times (TIME+)
T
– View network I/O as a combination
u
– Sort processes by USER
U
– View cumulative network I/O
w
– Delete finished warning log messages
W
– Show/hide Wifi module
x
– Delete finished warning and critical log messages
z
– Show/hide processes stats0
Enable/disable Irix/Solaris mode
The task’s CPU usage will be divided by the total number of CPUs
1
Switch between global CPU and per-CPU stats2
Enable/disable left sidebar3
Enable/disable the quick look module4
Enable/disable all but quick look and load module5
Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)6
Enable/disable mean GPU mode/
Switch between process command line or command name
Recent Comments