Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Go to file
2012-10-22 18:00:02 +02:00
doc Add logo to HitHub doc 2012-09-07 13:32:13 +02:00
glances Add -b (key 'b') to switch between bit/s or byte/s for network IO 2012-10-22 18:00:02 +02:00
i18n Files for the Brazilian Portuguese translation 2012-09-20 02:02:28 -03:00
man version 1.4.2.1 2012-10-02 09:17:47 +02:00
.gitignore Improved .gitignore 2012-04-04 12:44:12 +02:00
AUTHORS version 1.4 2012-07-06 14:03:32 +02:00
COPYING Strip leading/trailing whitespaces from all files 2012-06-19 13:00:00 +02:00
MANIFEST.in Fix Setup.py issue 2012-07-07 19:57:58 +02:00
messages.pot After the 2to3 / Python 3 compatibility 2012-09-10 16:13:21 +02:00
NEWS version 1.4.2.1 2012-10-02 09:17:47 +02:00
README Update installation doc 2012-09-14 16:28:18 +02:00
README-fr Update installation doc 2012-09-14 16:28:18 +02:00
README.md Update installation doc 2012-09-14 16:28:18 +02:00
screenshot-wide.png version 1.4.1 2012-09-06 10:33:27 +02:00
screenshot.png version 1.4.1 2012-09-06 10:33:27 +02:00
setup.py version 1.4.2.1 2012-10-02 09:17:47 +02:00
TODO version 1.4.1 2012-09-06 10:33:27 +02:00
uninstall.sh A simple uninstall script 2012-09-06 01:49:50 +02:00

Flattr this git repo

============================= Glances -- Eye on your system

screenshot

Description

Glances is a CLI curses based monitoring tool for GNU/Linux and BSD OS.

Glances uses the PsUtil library to get information from your system.

It is developed in Python.

Console (80x24) screenshot:

screenshot

Wide terminal (> 90x24) screenshot:

screenshot

Installation

Pre-requisites (information for packagers):

  • Python 2.6+ (not tested with Python 3+)
  • build-essential (for installation via Pypi and setup.py)
  • python-dev (for installation via Pypi)
  • python-setuptools (for the installation via setup.py)
  • python-psutil 0.4.1+ (replace the old libstatgrab's lib)
  • python-jinja2 2.0+ (optional for HTML export)

From package manager (very easy way)

Packages exist for Arch, Fedora, Redhat, FreeBSD...

From PyPi (easy and cross platform way)

PyPi is an official Python package manager.

You first need to install pypi on your system. For example on Debian/Ubuntu:

$ sudo apt-get update
$ sudo apt-get install python-pip build-essential python-dev

Then install the latest Glances version:

$ sudo pip install Glances

Note: if you are behind an HTTP Proxy, you should use

$ sudo pip install --proxy=user:password@url:port Glances

From PPA (easy way for Ubuntu/Mint...)

Arnaud Hartmann (thanks to him !) maintains a PPA with the latest Glances version:

The PPA is available for Ubuntu version 9.10 to 12.04.

To install the PPA just enter:

$ sudo add-apt-repository ppa:arnaud-hartmann/glances-stable
$ sudo apt-get update

Then install Glances:

$ sudo apt-get install glances

From Homebrew via PyPi (OS X)

$ brew install brew-pip
$ export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
$ brew pip Glances

From source

Get the latest version:

$ rm -rf /tmp/nicolargo-glances-* 
$ wget -O /tmp/glances-last.tgz https://github.com/nicolargo/glances/tarball/master

Glances use a standard GNU style installer (for a Debian like system):

$ sudo apt-get update
$ sudo apt-get install python-setuptools build-essential python-dev
$ cd /tmp
$ tar zxvf glances-last.tgz
$ cd nicolargo-glances-*
$ sudo python setup.py install

Running

Easy way (that's all folks !):

$ glances

User guide

By default, stats are refreshed every second, to change this setting, you can use the -t option. For example to set the refresh rate to 5 seconds:

$ glances -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:

  • 'h' to display a help message with the keys 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

  • 'd' Disable or enable the disk IO stats

  • 'f' Disable or enable the file system stats

  • 'l' Disable or enable the logs

  • 'm' to sort the processes list by process MEM

  • 'n' Disable or enable the network interfaces stats

  • 'p' to sort by process name

  • 'q' Exit

Header

screenshot

The header shows the host name and the operating system name, version and architecture.

CPU

Short view:

screenshot

Long view (only available if your terminal is wide enough)

screenshot

The CPU stats are shown as a percentage and for the configured refresh time. The total CPU usage is displayed on the first line.

screenshot

If horizontal space is available, per core CPU infomations are displayed.

Color code used:

If user|kernel|nice CPU is < 50%, then status is set to "OK".

If user|kernel|nice CPU is > 50%, then status is set to "CAREFUL".

If user|kernel|nice CPU is > 70%, then status is set to "WARNING".

If user|kernel|nice CPU is > 90%, then status is set to "CRITICAL".

Load

screenshot

On the Nosheep blog, Zach defines average load: "In short it is the average sum of the number of processes waiting in the run-queue plus the number currently executing over 1, 5, and 15 minute time periods."

Glances gets the number of CPU cores to adapt the alerts. With Glances, alerts on average load are only set on 5 and 15 mins. The first line also display the number of CPU core.

If average load is < O.7*Core, then status is set to "OK".

If average load is > O.7*Core, then status is set to "CAREFUL".

If average load is > 1*Core, then status is set to "WARNING".

If average load is > 5*Core, then status is set to "CRITICAL".

Memory

screenshot

Glances uses three columns: memory (RAM), "real" and swap.

Real used memory is: used - cache.

Real free memory is: free + cache.

With Glances, alerts are only set for on used swap and real memory.

If memory is < 50%, then status is set to "OK".

If memory is > 50%, then status is set to "CAREFUL".

If memory is > 70%, then status is set to "WARNING".

If memory is > 90%, then status is set to "CRITICAL".

Network bit rate

screenshot

Glances display the network interface bit rate. The unit is adapted dynamicaly (bits per second, Kbits per second, Mbits per second...).

Alerts are set only if the network interface maximum speed is available.

If bit rate is < 50%, then status is set to "OK".

If bit rate is > 50%, then status is set to "CAREFUL".

If bit rate is > 70%, then status is set to "WARNING".

If bit rate is > 90%, then status is set to "CRITICAL".

For example, on a 100 Mbps Ethernet interface, the warning status is set if the bit rate is higher than 70 Mbps.

Disk I/O

screenshot

Glances displays the disk I/O throughput. The unit is adapted dynamically (bytes per second, Kbytes per second, Mbytes per second...).

There is no alert on this information.

Filesystem

screenshot

Glances displays the total and used filesytem disk space. The unit is adapted dynamically (bytes per second, Kbytes per second, Mbytes per second...).

Alerts are set for used disk space:

If disk used is < 50%, then status is set to "OK".

If disk used is > 50%, then status is set to "CAREFUL".

If disk used is > 70%, then status is set to "WARNING".

If disk used is > 90%, then status is set to "CRITICAL".

Processes

Short view:

screenshot

Long view (only available if your terminal is wide enough)

screenshot

Glances displays a summary and a list of processes.

By default (or if you hit the 'a' key) the process list is automatically sorted by CPU of memory consumption.

The number of processes in the list is adapted to the screen size.

  • VIRT: Virtual memory size (in byte)

  • REST: Amount of resident memory (in byte)

  • CPU%: % of CPU used by the process

  • MEM%: % of MEM used by the process

  • PID: Process ID

  • USER: Process user ID

  • NI: Nice level of the process

  • S: Process status

    R - Running D - Sleeping (may not be interrupted) S - Sleeping (may be interrupted) T - Traced or stopped Z - Zombie or "hung" process

  • IO READ and WRITE: Per process IO read and write

  • TIME+: Cumulative CPU time used

  • NAME: Process name or command line

Logs

screenshot

A logs list is displayed in the bottom of the screen if (and only if):

  • at least one WARNING or CRITICAL alert was occured.
  • space is available in the bottom of the console/terminal

There is one line per alert with the following information:

  • start date
  • end date
  • alert name
  • (min/avg/max) values

screenshot

Glances displays the current time/date and access to the embedded help screen.

Localisation

To generate french locale execute as root or sudo : i18n_francais_generate.sh

To generate spanish locale execute as root or sudo : i18n_espanol_generate.sh