It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In RegisterIt looks like you're new here. If you want to get involved, click one of these buttons!
Glances is a cross-platform system monitoring tool based on the command line, written in Python, and utilizing the psutil library to gather system information. It allows you to monitor CPU usage, average load, memory, network interfaces, disk I/O, processes, and the file system.
In this guide, we will show how to install it on Ubuntu/Debian and RedHat based distributions (AlmaLinux 9, RockyLinux 9):
First, update the system.
On Ubuntu/Debian, run this command:
apt update && apt upgrade -y
On RedHat-based distributions, run the following command:
dnf update && dnf upgrade -y
Run the following command to install required dependencies on Ubuntu and Debian:
apt install -y python3 python3-pip
On RedHat distributions, run this:
dnf install -y python3 python3-pip
Run this command to install glances:
pip3 install glances
Please note: If you encounter the following error during installation, it may be due to an outdated version of Python (recommended version is Python 3.7 or higher).
In this case you need to upgrade your Python version. Run these commands:
dnf module reset python36
dnf module enable python39
dnf install python3.9 -y
Recheck Python version by running this command:
python3.9 --version
Then run this command to install Glances:
python3.9 -m pip install glances
To check if Glances installed on your server, run the following command:
glances --version
It should provide you the information about installed Glances version.
Once Glances is installed, you can launch it by running this command:
glances
You will see the Glances interface, which provides detailed data about resource usage on your server.
In Glances certain metrics are highlighted in different colors. Here's what they indicate:
Use the arrow keys to navigate in glances, allowing you to move up and down.
By default, processes are sorted by CPU usage. To sort them by RAM consumption, press m
.
To sort processes alphabetically by name, press the p
key.
To sort processes by disk I/O load, use the i
key.
The left side of the utility window by default contains summary data on input/output operations. To hide this information, press d
.
To return this data, press d
again.
To remove information about file system resource usage from the tool interface, press f
.
To exit from Glances simply press q
.
To display all Glances options on the screen, run this command:
glances --help
In this guide, we covered the installation and usage of Glances, a valuable tool for monitoring resource consumption in Linux. By utilizing hotkeys and options, you can customize and sort the program's output to suit your needs