Glances (All in one Place)– An Advanced Real Time System Performance Monitoring Tool for Linux

Glances is a cross-platform curses-based system monitoring tool written in Python. We can say all in one place, like maximum of information in a minimum of space. It uses psutil library to get information from your system.

Check other Monitoring Tools for Linux

Glances capable to monitor CPU, Memory, Load, Process list, Network interface, Disk I/O, Raid, Sensors, Filesystem (and folders), Docker, Monitor, Alert, System info, Uptime, Quicklook (CPU, MEM, LOAD), etc.,.

Alternatively we can monitor system performance throug built-in Web User Interface. Export all system statistics to CSV, StatsD, InfluxDB, ElasticSearch or even RabbitMQ. Glances also provides a dedicated Grafana dashboard.

By default Glances thresholds are (careful=50, warning=70 and critical=90) and we can modify as per our requirement. Glances configuration file located at /etc/glances/glances.conf.

Glances Color Codes:

  • GREEN : Ok
  • BLUE : Careful
  • VIOLET : Warning
  • RED : Critical

1) Method-1: Glances Auto Install script

We can easily install Glances through Glances Auto Install script, which supports all the modern Linux distro. Simply fire the below commend to install both dependencies and latest Glances production.

[Install Glances through Curl]
# curl -L https://bit.ly/glances | /bin/bash

or

[Install Glances through wget]
# wget -O- https://bit.ly/glances | /bin/bash

1a) Method-2: Install Glances through PyPI

Glances is on PyPI, so we can easily install via PyPI. CentOS and RHEL don’t offer pip, so enable EPEL repository to get the package installed.

[Install Dependencies for Ubuntu/Debian]
$ sudo apt-get install python-pip python-dev 

[Install Dependencies for RHEL/Fedora/CentOS]
$ sudo yum install python-pip python-devel

[Install Dependencies for Arch Linux System]
$ sudo pacman -S python-pip

[Install additional libraries in order to use optional features]
$ sudo pip install bottle batinfo https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz zeroconf netifaces pymdstat influxdb potsdb statsd pystache docker-py pysnmp pika py-cpuinfo scandir

1b) Method-3: Install Glances from distribution package

We can easily install Glances on Linux Distribution such as Debian, Ubuntu, Linux Mint, Fedora, CentOS, RHEL, Mageia, ArchLinux, Manjaro & FreeBSD from official repository.

[CentOS/RHEL & Upto Fedora 21]
# yum install glances

[Fedora 22 & later]
# dnf install glances

[Debian, Ubuntu & Mint]
$ sudo apt-get install glances

[suse & openSUSE]
# zypper install glances

[Mageia]
# urpmi glances

[ArchLinux/Manjaro]
# pacman -S glances

[FreeBSD]
# pkg install py27-glances

Known issue on RHEL/CentOS/Fedora installation

For Python 2.6 RedHat-based distros there might be an issue with starting Glances, Try upgrading setuptools, has been proven to solve the problem.

$ sudo pip install -U setuptools

2) Glances Screenshot tour

i have added three different screenshot which was taken from different purpose.

Command line screenshot

Command line screenshot

Glances GUI screenshot

Glances GUI screenshot

Glances Mobile view Screenshot

Glances Mobile view Screenshot

3) Glances Options

Glances offering several command line options, see the list below.

  • a Sort processes automatically
  • b Bytes or bits for network I/O
  • c Sort processes by CPU%
  • l Show/hide alert logs
  • m Sort processes by MEM%
  • w Delete warning alerts
  • u Sort processes by USER
  • x Delete warning and critical alerts
  • p Sort processes by name
  • 1 Global CPU or per-CPU stats
  • i Sort processes by I/O rate
  • I Show/hide IP module
  • t Sort processes by TIME
  • D Enable/disable Docker stats
  • d Show/hide disk I/O stats
  • T View network I/O as combination
  • f Show/hide filesystem stats
  • U View cumulative network I/O
  • n Show/hide network stats
  • F Show filesystem free space
  • s Show/hide sensors stats
  • g Generate graphs for current history
  • 2 Show/hide left sidebar
  • r Reset history
  • z Enable/disable processes stats
  • h Show/hide this help screen
  • 3 Enable/disable quick look plugin
  • B Count/rate for Disk I/O
  • e Enable/disable top extended stats
  • 5 Show/hide top menu (QL, CPU, MEM, SWAP and LOAD)
  • / Enable/disable short processes name
  • 0 Enable/disable Irix process CPU
  • q Quit (Esc and Ctrl-C also work)

Enjoy…)

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...