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.
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
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.
3) Glances Options
Glances offering several command line options, see the list below.
aSort processes automatically
bBytes or bits for network I/O
cSort processes by CPU%
lShow/hide alert logs
mSort processes by MEM%
wDelete warning alerts
uSort processes by USER
xDelete warning and critical alerts
pSort processes by name
1Global CPU or per-CPU stats
iSort processes by I/O rate
IShow/hide IP module
tSort processes by TIME
DEnable/disable Docker stats
dShow/hide disk I/O stats
TView network I/O as combination
fShow/hide filesystem stats
UView cumulative network I/O
nShow/hide network stats
FShow filesystem free space
sShow/hide sensors stats
gGenerate graphs for current history
2Show/hide left sidebar
zEnable/disable processes stats
hShow/hide this help screen
3Enable/disable quick look plugin
BCount/rate for Disk I/O
eEnable/disable top extended stats
5Show/hide top menu (QL, CPU, MEM, SWAP and LOAD)
/Enable/disable short processes name
0Enable/disable Irix process CPU
qQuit (Esc and Ctrl-C also work)