frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

How To Install Glances

Introduction

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):

Installation and Use Guide

1. Update the system

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

2. Install dependencies

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

3. Install Glances

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

4. Confirm Glances installation

To check if Glances installed on your server, run the following command:

glances --version

It should provide you the information about installed Glances version.

5. Launch Glances

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:

  • Green — parameters are within normal range.
  • Blue — a warning that requires attention but is not critical.
  • Purple (Violet)— the situation requires investigation and possibly intervention to prevent issues.
  • Red — a serious problem requiring immediate action to avoid instability or failures.

6. Navigating and Sorting Processes in Glances

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.

7. More information about Glances options and hotkeys

To display all Glances options on the screen, run this command:

glances --help

Conclusion

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

Sign In or Register to comment.

Time4VPS

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2025 Time4VPS. All rights reserved.

Get In Touch