Glances is a command-line interface curses-based monitoring tool for GNU/Linux or BSD OS.
Glances uses the libstatgrab library to get information from your system. It is developed in Python and uses the python-statgrab lib.
From package manager
Packages exist for Arch, Fedora, Redhat ...
Get the latest version:
Glances use a standard GNU style installer:
tar zxvf glances-1.3.2.tar.gz $ cd glances-1.3.2 $ ./configure $ make $ sudo make install
Notes: For Debian. The Debian Squeeze repos only include the python-statgrab 0.4. You had to install the version 0.5 using the following commands:
sudo apt-get install libstatgrab-dev pkg-config python-dev make $ wget http://ftp.uk.i-scream.org/sites/ftp.i-scream.org/pub/i-scream/pystatgrab/pystatgrab-0.5.tar.gz $ tar zxvf pystatgrab-0.5.tar.gz $ cd pystatgrab-0.5/ $ ./setup.py build $ sudo ./setup.py install
Notes: For Ubuntu 10.04 and 10.10. The instruction to install the version 0.5 are here: https://github.com/nicolargo/glances/issues/5#issuecomment-3033194
By default, stats are refreshed every second, to change this setting, you can use the -t option. For exemple to set the refrech rate to 5 seconds:
glances.py -t 5
Importants stats are colored:
GREEN: stat counter is "OK"
BLUE: stat counter is "CAREFUL"
MAGENTA: stat counter is "WARNING"
RED: stat counter is "CRITICAL"
When Glances is running, you can press:
'a' to set the automatic mode. The processes are sorted automatically
If CPU > 70%, sort by process "CPU consumption"
If MEM > 70%, sort by process "memory size"
'c' to sort the processes list by CPU consumption
'm' to sort the processes list by process size