Skip to content

Glances 2.7 release notes

Compare
Choose a tag to compare
@nicolargo nicolargo released this 10 Sep 13:20
· 3588 commits to develop since this release

Welcome to the new Glances 2.7 version.

GLANCES

New features

Add a new Application Monitoring Process (AMP) #780

The AMP plugin replaces the old Monitoring Process plugin. It allows users to
define a processes list and optionally execute a specific action.

AMP

An entry in the AMP list should be defined by a regular expression (on the command
line). When the regular expression matchs (processes are "up and running"),
Glances do the following thinks:

  • if nothing is defined, the global CPU and memory of matched processes are
    displayed
  • a command line could be executed and the output will be displayed
  • a Python script existing in the glances/amps folder could be executed. For
    this last option a list of predefined scripts is provided by the Glances team:
    Nginx, Systemd and SystemV. You can write your owns Python scripts by following
    a existing script as a example.

If you want to monitor the Dropbox daemon, you should add the following section
in the Glances configuration file:

[amp_dropbox]
enable=true
regex=.*dropbox.*
refresh=3
command=dropbox status
one_line=false
countmin=1

How to read this configuration file ?

  • First of all, we add a new AMP section. An AMP entry should alway start with
    amp_ ([amp_dropbox]).
  • We enable the AMP entry (enable=true).
  • We want to focus on the dropbox process (regex=.dropbox.).
  • The AMP entry will be refreshed every 3 seconds (refresh=3).
  • The command line to execute if the process is up and running (command=dropbox status).
  • We force Glances to display all the output of the command line, not only the
    first line (one_line=false).
  • If the number of matching process is < 1, the line will be display with the
    Warning color (countmin=1).

See more examples in the default Glances configuration file (https://github.com/nicolargo/glances/blob/master/conf/glances.conf)

New Ports scanner plugin #734

The Ports Scanner plugin aims at monitoring local or remote TCP/ICMP ports status.

PORTS

A list of host/port is define in the configuration file and the result (RTT delay)
is displayed in the user interface.

[ports]
# Ports scanner plugin configuration
# Interval in second between two scans
refresh=30
# Set the default timeout (in second) for a scan (can be overwrite in the scan list)
timeout=3
# If port_default_gateway is True, add the default gateway on top of the scan list
port_default_gateway=True
# Define the scan list (port_x_- with 1 < x < 255)
# port_x_host (name or IP) is mandatory
# port_x_port (TCP port number) is optional (if not set, use ICMP)
# port_x_description is optional (if not set, define to host:port)
# port_x_timeout is optional and overwrite the default timeout value
# port_x_rtt_warning is optional and defines the warning threshold in ms
port_1_host=192.168.0.1
port_1_port=80
port_1_description=Home Box
port_1_timeout=1
port_2_host=www.free.fr
port_2_description=My ISP
port_3_host=www.google.com
port_3_description=Internet ICMP
port_3_rtt_warning=1000
port_4_host=www.google.com
port_4_description=Internet Web
port_4_port=80
port_4_rtt_warning=1000

CPU additional stats monitoring: Context switch, Interrupts... #810

The following CPU stats are grabbed and displayed in the user interface:

  • ctx_switches: number of context switches (voluntary + involuntary) per second
  • interrupts: number of interrupts per second
  • soft_interrupts: number of software interrupts per second. Always set to 0 on Windows and SunOS.
  • syscalls: number of system calls since boot. Always set to 0 on Linux.

CPU

These new statistics are also available through the API:

$ python -m glances -w
Glances web server started on http://0.0.0.0:61208/

$ curl http://127.0.0.1:61208/api/2/cpu
{
   "guest_nice" : 0,
   "irq" : 0,
   "time_since_update" : 49.5867121219635,
   "total" : 7.1,
   "softirq" : 0,
   "ctx_switches" : 157897,
   "interrupts" : 51886,
   "user" : 5.7,
   "iowait" : 0.1,
   "guest" : 0,
   "soft_interrupts" : 10239,
   "syscalls" : 0,
   "cpucore" : 4,
   "system" : 1.4,
   "idle" : 92.9,
   "nice" : 0,
   "steal" : 0
}

Add Cassandra/Scylla export plugin #857

Additionally to CSV files, InfluxDB, OpenTSDB, StatsD, RabbitMQ, Elasticsearch,
and Riemann, it is now possible to export stats to a Cassandra or Scylla server.

The connection should be defined in the Glances configuration file as following:

[cassandra]
host=localhost
port=9042
protocol_version=3
keyspace=glances
replication_factor=2
table=localhost

and run Glances with:

$ glances --export-cassandra

The data model is the following:

CREATE TABLE <table> (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time))

Only numerical stats are stored in the Cassandra table. All the stats are
converted to float. If a stat can not be converted to float, it is not stored
in the database.

IRQ monitoring #911

Only on GNU/Linux, a new IRQ plugin displays the top 5 interrupts rate.

IRQ

The stats are grabbed from the /proc/interrupts file.

Display a warning message when Glances is outdated #865

On online machines, Glances can check if a newer version is available on Pypi.

This feature can be enable (true) or disable (false) in the Glances configuration
file:

[global]
# Does Glances should check if a newer version is available on Pypi ?
check_update=true

Filter processes by others stats (username) #748

The processes filtering feature has been improved.

It's possible to filter the processes list using the ENTER key.

Filter syntax is the following (examples):

python > Filter processes name or command line starting with python (regexp)
.*python.- > Filter processes name or command line containing python (regexp)
username:nicolargo > Processes of nicolargo user (key:regexp)
cmdline:/usr/bin.- > Processes starting by /usr/bin

Enhancements

(See issues for details)

  • Refactor stats history and export to graph #696
  • [Web UI] dependency manager and build system #906
  • Ports plugin keyboard shortcut #899
  • [Web UI] add ports plugin #897
  • [Web UI] handle aliases in diskio plugin #896
  • Improve documentation documentation enhancement #872
  • Add new amp shortcut 'A' on help page #863
  • Allow theme to be set in configuration file enhancement #862
  • [WebUI] Hide additional cpu data if not available #850
  • [WebUI] Add 'x' and 'w' shortcuts to clean logs messages enhancement #843
  • [Web UI] Fix folder plugin decoration issue for exclamation/question mark #831
  • [Folders] Differentiate permission issue and non-existence of a directory enhancement needs test #828
  • [Web UI] add cpu name in quicklook plugin #825
  • [Web UI] Remove loading page enhancement #807
  • Update Glances with new PsUtil 4.x stats enhancement needs test #797
  • Improve IP plugin to display public IP address enhancement needs test #646

Bugs corrected

(See issues for details)

  • Crash on launch when viewing temperature of laptop HDD in sleep mode (issue #824)
  • [Web UI] Fix folders plugin never displayed (issue #829)
  • Correct issue IP plugin: VPN with no internet access (issue #842)
  • Idle process is back on FreeBSD and Windows (issue #844)
  • On Windows, Glances try to display unexisting Load stats (issue #871)
  • Check CPU info (issue #881)
  • Unicode error on processlist on Windows server 2008 (french) (issue #886)
  • PermissionError/OSError when starting glances (issue #885)
  • Zeroconf problem with zeroconf_type = "_%s._tcp." % appname (issue #888)
  • Zeroconf problem with zeroconf service name (issue #889)
  • [WebUI] Glances will not get past loading screen - Windows OS (issue #815)
  • Improper bytes/unicode in glances_hddtemp.py (issue #887)
  • Top 3 processes are back in the alert summary

Documentation

Full installation guide: https://github.com/nicolargo/glances/blob/master/README.rst#installation

Official documentation: http://glances.readthedocs.io