Glances is a cross-platform curses-based system monitoring tool written in Python. Since it is based on an open architecture, where developers can add new plugins or exports modules.
Glances provide information regarding memory, CPU, Disk IO, file system, Uptime, processes, interfaces, alerts & many other system information.
Install EPEL Repo by running the following command.
dnf install epel-release
We will install glances using the
dnf package manger and additionally install a dependency package called
python-bottle that is required to run glances on a web server.
dnf install glances python-bottle
Glances listen on port 61208 by default and enable ports in the firewall to use glances from the browser.
firewall-cmd --zone=public --add-port=61208/tcp --permanent firewall-cmd --reload
Once successfully installed, we can use it for real-time Linux monitoring by opening the terminal & running the following command below:
[root@server ~]# glances -w Glances Web User Interface started on http://0.0.0.0:61208/
Now, open your web browser and access your website using the URL
This is an optional step, where you can create a service for Glances and run as a service in the system background.
Let us start by creating a service configuration as below.
using your favorite editor, edit the file
Copy-Paste the below configuration into the file.
[Unit] Description = Glances in Web Server Mode After = network.target [Service] ExecStart = /usr/bin/glances -w -t 5 [Install] WantedBy = multi-user.target
Save and exit the file.
Now you can test it by starting the service,
systemctl start glancesweb
View the status with the below command.
systemctl status glancesweb
Stop the service,
systemctl stop glancesweb
This concludes the topic of installing Glances on AlmaLinux 9.