Linux Server Real-Time Monitoring with Glances
Today I’m going share a tool to monitor any Linux server in real-time. The tool is Glances. Glances is a cross-platform system monitoring tool written in Python. We can install it on our server in some ways. Let’s start.
Table of Contents
Step 1 : Install Python
As Glances is written in Python, we need to install Python on our server. Let’s do this:
# CentOS/RHEL:
sudo yum install python python-devel
# Ubuntu
sudo apt-get install python python-dev
Step 2 : Install Using Official Script
The easiest way to install Glances on a server using their official script. The latest version of Glances will be installed. Just run this command:
sudo curl -L https://bit.ly/glances | /bin/bash
# or,
sudo wget -O- https://bit.ly/glances | /bin/bash
This script supports most of the Linux distributions. If it doesn’t work on your server, then please follow another method.
Step 3 : Install from Repository
Ubuntu Server: Glances is available with the default Ubuntu repository. Just run this command to install:
sudo apt-get install glances
CentOS/RHEL Server: On CentOS/RHEL, Glances is available with EPEL repository. Run the following command on your server:
# RHEL/CentOS 8:
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# RHEL/CentOS 7:
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
# RHEL/CentOS 6 (64 Bit):
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# RHEL/CentOS 6 (32 Bit):
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
After that run this command:
sudo yum install glances
Step 4 : Install Using PIP
If you have PIP installed on your server, then you are able to install Glances using PIP. Here’s the command:
sudo pip install glances
Step 5 : Glances Usage
We have successfully installed Glances on our machine. We can run Glances in 3 ways:
- Standalone Mode
- Client-Server Mode
- Web Server Mode
# Standalone Mode: If you want to monitor your local machine, then just run:
glances
You’ll see a screen like this:

# Client-Server Mode: If you want to remotely monitor a machine, then this command on your machine:
glances -s
# Glances server is running on 0.0.0.0:61209
Now from the remote machine, monitor your server by running this command:
glances -c IP_ADDRESS_OF_YOUR_SERVER
# Web Server Mode: To run the glances in web server mode, execute the following command:
glances -w
# Glances web server started on http://0.0.0.0:61208/
If you see an error like Bottle module not found. Glances cannot start in web server mode
then install bottle using PIP:
sudo pip install bottle
You can also set the refresh rate of the page. To refresh the page every 20 seconds, just visit like this http://server-ip:61208/20
.
The article is over. Thanks for reading. ?
Comment
Preview may take a few seconds to load.
Markdown Basics
Below you will find some common used markdown syntax. For a deeper dive in Markdown check out this Cheat Sheet
Bold & Italic
Italics *asterisks*
Bold **double asterisks**
Code
Inline Code
`backtick`Code Block```
Three back ticks and then enter your code blocks here.
```
Headers
# This is a Heading 1
## This is a Heading 2
### This is a Heading 3
Quotes
> type a greater than sign and start typing your quote.
Links
You can add links by adding text inside of [] and the link inside of (), like so:
Lists
To add a numbered list you can simply start with a number and a ., like so:
1. The first item in my list
For an unordered list, you can add a dash -, like so:
- The start of my list
Images
You can add images by selecting the image icon, which will upload and add an image to the editor, or you can manually add the image by adding an exclamation !, followed by the alt text inside of [], and the image URL inside of (), like so:
Dividers
To add a divider you can add three dashes or three asterisks:
--- or ***

Comments (0)