mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-25 19:17:09 +03:00
972 lines
45 KiB
HTML
972 lines
45 KiB
HTML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
|
<title>Glances</title>
|
|
<style type="text/css">
|
|
|
|
/*
|
|
:Author: Alessio Sergi
|
|
:Contact: al3hex at gmail dot com
|
|
|
|
Stylesheet for use with Docutils.
|
|
|
|
This file is the CSS for the Glances documentation.
|
|
*/
|
|
|
|
body {
|
|
margin-top: 1em;
|
|
margin-left: 1em;
|
|
max-width: 80em;
|
|
font-family: serif;
|
|
font-size: 16px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 20px;
|
|
}
|
|
|
|
h1.title {
|
|
font-size: 22px;
|
|
}
|
|
|
|
h2, h3, p.topic-title {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.first {
|
|
/* override p.topic-title margin styles */
|
|
margin-top: 0 ! important;
|
|
}
|
|
|
|
a {
|
|
color: #0055df;
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
color: #339999;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
a:visited {
|
|
color: #800080;
|
|
}
|
|
|
|
a.toc-backref {
|
|
text-decoration: none;
|
|
color: black;
|
|
}
|
|
|
|
blockquote {
|
|
padding-left: 1ex;
|
|
border-left: 1px solid #008000;
|
|
max-width: 30em;
|
|
}
|
|
|
|
p.topic-title {
|
|
font-weight: bold;
|
|
}
|
|
|
|
pre {
|
|
margin-left: 2em;
|
|
margin-right: 2em;
|
|
}
|
|
|
|
.console, .literal-block {
|
|
background-color: #eeeeee;
|
|
border: 1px solid #cccccc;
|
|
max-width: 60em;
|
|
line-height: 19px;
|
|
overflow: auto;
|
|
padding: 6px 10px;
|
|
border-radius: 3px 3px 3px 3px;
|
|
}
|
|
|
|
span.option, tt.docutils {
|
|
white-space: nowrap;
|
|
border: 1px dotted #008000;
|
|
padding: 1px;
|
|
background-color: #eeeeee;
|
|
}
|
|
|
|
.literal, .literal-block, .option, .var {
|
|
font-family: monospace;
|
|
font-size: 10pt;
|
|
}
|
|
|
|
dl.docutils {
|
|
margin-left: 2em;
|
|
}
|
|
|
|
dl.docutils dd {
|
|
margin-bottom: 0.5em;
|
|
}
|
|
|
|
ol.simple {
|
|
margin-left: 0.5em;
|
|
}
|
|
|
|
table.docutils {
|
|
margin-left: 2em;
|
|
}
|
|
|
|
td.option-group {
|
|
padding-right: 1em;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="document" id="glances">
|
|
<h1 class="title">Glances</h1>
|
|
|
|
<p>This manual describes <em>Glances</em> version 2.3.</p>
|
|
<p>Copyright © 2011-2015 Nicolas Hennion <<a class="reference external" href="mailto:nicolas@nicolargo.com">nicolas@nicolargo.com</a>></p>
|
|
<p>January 2015</p>
|
|
<div class="contents topic" id="table-of-contents">
|
|
<p class="topic-title first">Table of Contents</p>
|
|
<ul class="simple">
|
|
<li><a class="reference internal" href="#introduction" id="id5">Introduction</a></li>
|
|
<li><a class="reference internal" href="#usage" id="id6">Usage</a><ul>
|
|
<li><a class="reference internal" href="#standalone-mode" id="id7">Standalone Mode</a></li>
|
|
<li><a class="reference internal" href="#client-server-mode" id="id8">Client/Server Mode</a></li>
|
|
<li><a class="reference internal" href="#web-server-mode" id="id9">Web Server Mode</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#command-reference" id="id10">Command Reference</a><ul>
|
|
<li><a class="reference internal" href="#command-line-options" id="id11">Command-Line Options</a></li>
|
|
<li><a class="reference internal" href="#interactive-commands" id="id12">Interactive Commands</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#configuration" id="id13">Configuration</a></li>
|
|
<li><a class="reference internal" href="#logs-and-debug-mode" id="id14">Logs and debug mode</a></li>
|
|
<li><a class="reference internal" href="#anatomy-of-the-application" id="id15">Anatomy Of The Application</a><ul>
|
|
<li><a class="reference internal" href="#legend" id="id16">Legend</a></li>
|
|
<li><a class="reference internal" href="#header" id="id17">Header</a></li>
|
|
<li><a class="reference internal" href="#cpu" id="id18">CPU</a></li>
|
|
<li><a class="reference internal" href="#load" id="id19">Load</a></li>
|
|
<li><a class="reference internal" href="#memory" id="id20">Memory</a></li>
|
|
<li><a class="reference internal" href="#network" id="id21">Network</a></li>
|
|
<li><a class="reference internal" href="#disk-i-o" id="id22">Disk I/O</a></li>
|
|
<li><a class="reference internal" href="#file-system" id="id23">File System</a></li>
|
|
<li><a class="reference internal" href="#sensors" id="id24">Sensors</a></li>
|
|
<li><a class="reference internal" href="#processes-list" id="id25">Processes List</a></li>
|
|
<li><a class="reference internal" href="#monitored-processes-list" id="id26">Monitored Processes List</a></li>
|
|
<li><a class="reference internal" href="#logs" id="id27">Logs</a></li>
|
|
<li><a class="reference internal" href="#docker" id="id28">Docker</a></li>
|
|
<li><a class="reference internal" href="#actions" id="id29">Actions</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#gateway-to-others-services" id="id30">Gateway to others services</a></li>
|
|
<li><a class="reference internal" href="#apis-documentations" id="id31">APIs Documentations</a></li>
|
|
<li><a class="reference internal" href="#support" id="id32">Support</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="introduction">
|
|
<h1><a class="toc-backref" href="#id5">Introduction</a></h1>
|
|
<p>Glances is a cross-platform curses-based system monitoring tool which
|
|
aims to present a maximum of information in a minimum of space, ideally
|
|
to fit in a classical 80x24 terminal or higher to have additional
|
|
information. It can adapt dynamically the displayed information depending
|
|
on the terminal size.</p>
|
|
<p>Glances can also work in client/server mode. Remote monitoring could be
|
|
done via terminal or web interface.</p>
|
|
<p>Glances is written in Python and uses the <a class="reference external" href="https://code.google.com/p/psutil/">psutil</a> library to get
|
|
information from your system.</p>
|
|
<p>Console (80x24)</p>
|
|
<img alt="images/screenshot.png" src="images/screenshot.png" />
|
|
<p>Full view (>80x24)</p>
|
|
<img alt="images/screenshot-wide.png" src="images/screenshot-wide.png" />
|
|
<p>Web interface (Firefox)</p>
|
|
<img alt="images/screenshot-web.png" src="images/screenshot-web.png" />
|
|
</div>
|
|
<div class="section" id="usage">
|
|
<h1><a class="toc-backref" href="#id6">Usage</a></h1>
|
|
<div class="section" id="standalone-mode">
|
|
<h2><a class="toc-backref" href="#id7">Standalone Mode</a></h2>
|
|
<p>Simply run:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic prompt">$</span> glances
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="client-server-mode">
|
|
<h2><a class="toc-backref" href="#id8">Client/Server Mode</a></h2>
|
|
<p>If you want to remotely monitor a machine, called <tt class="docutils literal">server</tt>, from
|
|
another one, called <tt class="docutils literal">client</tt>, just run on the server:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic output">server$ glances -s</span>
|
|
</pre>
|
|
<p>and on the client:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic output">client$ glances -c @server</span>
|
|
</pre>
|
|
<p>where <tt class="docutils literal">@server</tt> is the IP address or hostname of the server.</p>
|
|
<p>Glances can centralize available Glances servers using the <tt class="docutils literal"><span class="pre">--browser</span></tt> option. The server list can be staticaly defined in the Glances configuration file (section [serverlist]). Glances can also detect and display all Glances servers available on you network (auto discover mode is based on the the Zeroconf protocol only available on GNU/Linux and Mac OS X):</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic output">client$ glances --browser</span>
|
|
</pre>
|
|
<p>It is possible to disable the auto discover mode <tt class="docutils literal"><span class="pre">--disable-autodiscover</span></tt>.</p>
|
|
<p>In server mode, you can set the bind address <tt class="docutils literal"><span class="pre">-B</span> ADDRESS</tt> and listening
|
|
TCP port <tt class="docutils literal"><span class="pre">-p</span> PORT</tt>.</p>
|
|
<p>In client mode, you can set the TCP port of the server <tt class="docutils literal"><span class="pre">-p</span> PORT</tt>.</p>
|
|
<p>You can set a password to access to the server <tt class="docutils literal"><span class="pre">--password</span></tt>.</p>
|
|
<p>Default binding address is <tt class="docutils literal">0.0.0.0</tt> (Glances will listen on all the
|
|
available network interfaces) and TCP port is <tt class="docutils literal">61209</tt>.</p>
|
|
<p>In client/server mode, limits are set by the server side.</p>
|
|
<p>Glances is <tt class="docutils literal">IPv6</tt> compatible. Just use the <tt class="docutils literal"><span class="pre">-B</span> ::</tt> option to bind to
|
|
all IPv6 addresses.</p>
|
|
<p>As an experimental feature, if Glances server is not detected by the
|
|
client, the latter will try to grab stats using the <tt class="docutils literal">SNMP</tt> protocol:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic output">client$ glances -c @snmpserver</span>
|
|
</pre>
|
|
<p>Note: Stats grabbed by SNMP request are limited (operating system dependent).</p>
|
|
</div>
|
|
<div class="section" id="web-server-mode">
|
|
<h2><a class="toc-backref" href="#id9">Web Server Mode</a></h2>
|
|
<p>If you want to remotely monitor a machine, called <tt class="docutils literal">server</tt>, from any
|
|
device with a web browser, just run the server with the <tt class="docutils literal"><span class="pre">-w</span></tt> option:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic output">server$ glances -w</span>
|
|
</pre>
|
|
<p>and on the client enter the following URL in your favorite web browser:</p>
|
|
<pre class="literal-block">
|
|
http://@server:61208
|
|
</pre>
|
|
<p>where <tt class="docutils literal">@server</tt> is the IP address or hostname of the server.</p>
|
|
<p>To change the refresh rate of the page, just add the period in seconds between refreshes at the end of the URL, ie. to refresh every 10s, use <tt class="docutils literal"><span class="pre">http://@server:61208/10</span></tt>.</p>
|
|
<p>The Glances web interface follows responsive web design principles.</p>
|
|
<p>Screenshot from Chrome on Android</p>
|
|
<img alt="images/screenshot-web2.png" src="images/screenshot-web2.png" />
|
|
</div>
|
|
</div>
|
|
<div class="section" id="command-reference">
|
|
<h1><a class="toc-backref" href="#id10">Command Reference</a></h1>
|
|
<div class="section" id="command-line-options">
|
|
<h2><a class="toc-backref" href="#id11">Command-Line Options</a></h2>
|
|
<blockquote>
|
|
<table class="docutils option-list" frame="void" rules="none">
|
|
<col class="option" />
|
|
<col class="description" />
|
|
<tbody valign="top">
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">-h</span>, <span class="option">--help</span></kbd></td>
|
|
<td>show this help message and exit</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">-V</span>, <span class="option">--version</span></kbd></td>
|
|
<td>show program's version number and exit</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">-d</span>, <span class="option">--debug</span></kbd></td>
|
|
<td>Enable debug mode</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">-C <var>CONF_FILE</var></span>, <span class="option">--config <var>CONF_FILE</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>path to the configuration file</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--enable-history</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>enable the history mode</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--disable-bold</span></kbd></td>
|
|
<td>disable bold mode in the terminal</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--disable-diskio</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>disable disk I/O module</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--disable-fs</span></kbd></td>
|
|
<td>disable filesystem module</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--disable-network</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>disable network module</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--disable-sensors</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>disable sensors module</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--disable-left-sidebar</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>disable left sidebar</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--disable-process</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>disable process module</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--disable-log</span></kbd></td>
|
|
<td>disable log module</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--enable-process-extended</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>enable extended stats on top process</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--enable-history</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>enable the history mode</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--path-history <var>PATH_HISTORY</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Set the export path for graph history</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--export-csv <var>CSV_FILE</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>export stats to a CSV file</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--export-influxdb</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>export stats to an InfluxDB server</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--export-statsd</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>export stats to a Statsd server</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">-c <var>CLIENT</var></span>, <span class="option">--client <var>CLIENT</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>connect to a Glances server by IPv4/IPv6 address or
|
|
hostname</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">-s</span>, <span class="option">--server</span></kbd></td>
|
|
<td>run Glances in server mode</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--browser</span></kbd></td>
|
|
<td>run the Glances client browser (list of Glances server)</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--disable-autodiscover</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>disable autodiscover feature</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">-p <var>PORT</var></span>, <span class="option">--port <var>PORT</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>define the client/server TCP port [default: 61209]</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">-B <var>BIND_ADDRESS</var></span>, <span class="option">--bind <var>BIND_ADDRESS</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>bind server to the given IPv4/IPv6 address or hostname</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--password-badidea <var>PASSWORD_ARG</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>define password from the command line</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--password</span></kbd></td>
|
|
<td>define a client/server password from the prompt or
|
|
file</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--disable-autodiscover</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Hide Glances server from the auto discover feature</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--snmp-community <var>SNMP_COMMUNITY</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>SNMP community</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--snmp-port <var>SNMP_PORT</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>SNMP port</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--snmp-version <var>SNMP_VERSION</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>SNMP version (1, 2c or 3)</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--snmp-user <var>SNMP_USER</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>SNMP username (only for SNMPv3)</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--snmp-auth <var>SNMP_AUTH</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>SNMP authentication key (only for SNMPv3)</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--snmp-force</span></kbd></td>
|
|
<td>force SNMP mode</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">-t <var>TIME</var></span>, <span class="option">--time <var>TIME</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>set refresh time in seconds [default: 3 sec]</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">-w</span>, <span class="option">--webserver</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>run Glances in web server mode</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">-f <var>PROCESS_FILTER</var></span>, <span class="option">--process-filter <var>PROCESS_FILTER</var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>set the process filter patern (regular expression)</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--process-short-name</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>force short name for processes name</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--hide-kernel-threads</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>hide kernel threads in process list</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--tree</span></kbd></td>
|
|
<td>display processes as a tree</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">-b</span>, <span class="option">--byte</span></kbd></td>
|
|
<td>display network rate in byte per second</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">-1</span>, <span class="option">--percpu</span></kbd></td>
|
|
<td>start Glances in per CPU mode</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--fs-free-space</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>display FS free space instead of used</td></tr>
|
|
<tr><td class="option-group">
|
|
<kbd><span class="option">--theme-white</span></kbd></td>
|
|
<td>optimize display for white background</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</blockquote>
|
|
</div>
|
|
<div class="section" id="interactive-commands">
|
|
<h2><a class="toc-backref" href="#id12">Interactive Commands</a></h2>
|
|
<p>The following commands (key pressed) are supported while in Glances:</p>
|
|
<dl class="docutils">
|
|
<dt><tt class="docutils literal">ENTER</tt></dt>
|
|
<dd><p class="first">Set the process filter
|
|
Filter is a regular expression pattern:</p>
|
|
<ul class="last simple">
|
|
<li>gnome: all processes starting with the gnome string</li>
|
|
<li>.*gnome.*: all processes containing the gnome string</li>
|
|
</ul>
|
|
</dd>
|
|
<dt><tt class="docutils literal">a</tt></dt>
|
|
<dd><p class="first">Sort process list automatically</p>
|
|
<ul class="last simple">
|
|
<li>If CPU iowait <tt class="docutils literal">>60%</tt>, sort processes by I/O read and write</li>
|
|
<li>If CPU <tt class="docutils literal">>70%</tt>, sort processes by CPU usage</li>
|
|
<li>If MEM <tt class="docutils literal">>70%</tt>, sort processes by memory usage</li>
|
|
</ul>
|
|
</dd>
|
|
<dt><tt class="docutils literal">b</tt></dt>
|
|
<dd>Switch between bit/s or Byte/s for network I/O</dd>
|
|
<dt><tt class="docutils literal">c</tt></dt>
|
|
<dd>Sort processes by CPU usage</dd>
|
|
<dt><tt class="docutils literal">d</tt></dt>
|
|
<dd>Show/hide disk I/O stats</dd>
|
|
<dt><tt class="docutils literal">e</tt></dt>
|
|
<dd>Enable/disable top extended stats</dd>
|
|
<dt><tt class="docutils literal">f</tt></dt>
|
|
<dd>Show/hide file system stats</dd>
|
|
<dt><tt class="docutils literal">F</tt></dt>
|
|
<dd>Switch between FS used and free space</dd>
|
|
<dt><tt class="docutils literal">g</tt></dt>
|
|
<dd>Generate graphs for current history</dd>
|
|
<dt><tt class="docutils literal">h</tt></dt>
|
|
<dd>Show/hide the help screen</dd>
|
|
<dt><tt class="docutils literal">i</tt></dt>
|
|
<dd>Sort processes by I/O rate</dd>
|
|
<dt><tt class="docutils literal">l</tt></dt>
|
|
<dd>Show/hide log messages</dd>
|
|
<dt><tt class="docutils literal">m</tt></dt>
|
|
<dd>Sort processes by MEM usage</dd>
|
|
<dt><tt class="docutils literal">n</tt></dt>
|
|
<dd>Show/hide network stats</dd>
|
|
<dt><tt class="docutils literal">p</tt></dt>
|
|
<dd>Sort processes by name</dd>
|
|
<dt><tt class="docutils literal">q</tt> or <tt class="docutils literal">ESC</tt></dt>
|
|
<dd>Quit the current Glances session</dd>
|
|
<dt><tt class="docutils literal">r</tt></dt>
|
|
<dd>Reset history</dd>
|
|
<dt><tt class="docutils literal">s</tt></dt>
|
|
<dd>Show/hide sensors stats</dd>
|
|
<dt><tt class="docutils literal">t</tt></dt>
|
|
<dd>Sort process by CPU times (TIME+)</dd>
|
|
<dt><tt class="docutils literal">T</tt></dt>
|
|
<dd>View network I/O as combination</dd>
|
|
<dt><tt class="docutils literal">u</tt></dt>
|
|
<dd>View cumulative network I/O</dd>
|
|
<dt><tt class="docutils literal">w</tt></dt>
|
|
<dd>Delete finished warning log messages</dd>
|
|
<dt><tt class="docutils literal">x</tt></dt>
|
|
<dd>Delete finished warning and critical log messages</dd>
|
|
<dt><tt class="docutils literal">z</tt></dt>
|
|
<dd>Show/hide processes stats</dd>
|
|
<dt><tt class="docutils literal">1</tt></dt>
|
|
<dd>Switch between global CPU and per-CPU stats</dd>
|
|
<dt><tt class="docutils literal">2</tt></dt>
|
|
<dd>Enable/disable left sidebar</dd>
|
|
<dt><tt class="docutils literal">/</tt></dt>
|
|
<dd>Switch between short name / command line (processes name)</dd>
|
|
</dl>
|
|
<p>In the Glances client browser (accessible through the --browser command line argument):</p>
|
|
<dl class="docutils">
|
|
<dt><tt class="docutils literal">ENTER</tt></dt>
|
|
<dd>Run Glances client to the selected server</dd>
|
|
<dt><tt class="docutils literal">UP</tt></dt>
|
|
<dd>Up in the servers list</dd>
|
|
<dt><tt class="docutils literal">DOWN</tt></dt>
|
|
<dd>Down in the servers list</dd>
|
|
<dt><tt class="docutils literal">q</tt> or <tt class="docutils literal">ESC</tt></dt>
|
|
<dd>Quit Glances</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="configuration">
|
|
<h1><a class="toc-backref" href="#id13">Configuration</a></h1>
|
|
<p>No configuration file is mandatory to use Glances.</p>
|
|
<p>Furthermore a configuration file is needed to set up limits, disks or
|
|
network interfaces to hide and/or monitored processes list or to define
|
|
alias.</p>
|
|
<p>By default, the configuration file is under:</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field"><th class="field-name">Linux:</th><td class="field-body"><tt class="docutils literal">/etc/glances/glances.conf</tt></td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">*BSD and OS X:</th><td class="field-body"><tt class="docutils literal">/usr/local/etc/glances/glances.conf</tt></td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Windows:</th><td class="field-body"><tt class="docutils literal"><span class="pre">%APPDATA%\glances\glances.conf</span></tt></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>On Windows XP, the <tt class="docutils literal">%APPDATA%</tt> path is:</p>
|
|
<pre class="literal-block">
|
|
C:\Documents and Settings\<User>\Application Data
|
|
</pre>
|
|
<p>Since Windows Vista and newer versions:</p>
|
|
<pre class="literal-block">
|
|
C:\Users\<User>\AppData\Roaming
|
|
or
|
|
%userprofile%\AppData\Roaming
|
|
</pre>
|
|
<p>You can override the default configuration, located in one of the above
|
|
directories on your system, except for Windows.</p>
|
|
<p>Just copy the <tt class="docutils literal">glances.conf</tt> file to your <tt class="docutils literal">$XDG_CONFIG_HOME</tt> directory,
|
|
e.g., on Linux:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic output">mkdir -p $XDG_CONFIG_HOME/glances
|
|
cp /usr/share/doc/glances/glances.conf $XDG_CONFIG_HOME/glances/</span>
|
|
</pre>
|
|
<p>On OS X, you should copy the configuration file to
|
|
<tt class="docutils literal">~/Library/Application Support/glances/</tt>.</p>
|
|
<p><em>Configuration file description</em></p>
|
|
<p>Each plugin and export module can have a section.</p>
|
|
<p>Example for the CPU plugin:</p>
|
|
<pre class="code literal-block">
|
|
[cpu]
|
|
user_careful=50
|
|
user_warning=70
|
|
user_critical=90
|
|
iowait_careful=50
|
|
iowait_warning=70
|
|
iowait_critical=90
|
|
system_careful=50
|
|
system_warning=70
|
|
system_critical=90
|
|
steal_careful=50
|
|
steal_warning=70
|
|
steal_critical=90
|
|
</pre>
|
|
<p>By default Steal CPU time alerts aren't logged. If you want to enable log/alert, just add:</p>
|
|
<pre class="code literal-block">
|
|
steal_log=True
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="logs-and-debug-mode">
|
|
<h1><a class="toc-backref" href="#id14">Logs and debug mode</a></h1>
|
|
<p>Glances logs all its internal messages to a log file. By default, only
|
|
INFO & WARNING & ERROR &CRITICAL levels are logged, but DEBUG messages
|
|
can ben logged using the -d option on the command line.</p>
|
|
<p>By default, the log file is under:</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field"><th class="field-name" colspan="2">Linux, *BSD and OS X:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"><tt class="docutils literal">/tmp/glances.log</tt></td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Windows:</th><td class="field-body"><tt class="docutils literal"><span class="pre">%APPDATA%\Local\temp\glances.log</span></tt></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>If glances.log is not writable, a new file will be created and returned to the user console.</p>
|
|
</div>
|
|
<div class="section" id="anatomy-of-the-application">
|
|
<h1><a class="toc-backref" href="#id15">Anatomy Of The Application</a></h1>
|
|
<div class="section" id="legend">
|
|
<h2><a class="toc-backref" href="#id16">Legend</a></h2>
|
|
<div class="line-block">
|
|
<div class="line"><tt class="docutils literal">GREEN</tt> stat counter is <tt class="docutils literal">"OK"</tt></div>
|
|
<div class="line"><tt class="docutils literal">BLUE</tt> stat counter is <tt class="docutils literal">"CAREFUL"</tt></div>
|
|
<div class="line"><tt class="docutils literal">MAGENTA</tt> stat counter is <tt class="docutils literal">"WARNING"</tt></div>
|
|
<div class="line"><tt class="docutils literal">RED</tt> stat counter is <tt class="docutils literal">"CRITICAL"</tt></div>
|
|
</div>
|
|
<p><em>Note</em>: only stats with colored background will be logged in the alert
|
|
view.</p>
|
|
</div>
|
|
<div class="section" id="header">
|
|
<h2><a class="toc-backref" href="#id17">Header</a></h2>
|
|
<img alt="images/header.png" src="images/header.png" />
|
|
<p>The header shows the hostname, OS name, release version, platform
|
|
architecture and system uptime (on the upper right corner).
|
|
Additionally, on GNU/Linux, it also shows the kernel version.</p>
|
|
<p>In client mode, the server connection status is displayed.</p>
|
|
<p>Connected:</p>
|
|
<img alt="images/connected.png" src="images/connected.png" />
|
|
<p>Disconnected:</p>
|
|
<img alt="images/disconnected.png" src="images/disconnected.png" />
|
|
</div>
|
|
<div class="section" id="cpu">
|
|
<h2><a class="toc-backref" href="#id18">CPU</a></h2>
|
|
<p>Short view:</p>
|
|
<img alt="images/cpu.png" src="images/cpu.png" />
|
|
<p>If enough horizontal space is available, extended CPU information are
|
|
displayed.</p>
|
|
<p>Extended view:</p>
|
|
<img alt="images/cpu-wide.png" src="images/cpu-wide.png" />
|
|
<p>To switch to per-CPU stats, just hit the <tt class="docutils literal">1</tt> key:</p>
|
|
<img alt="images/per-cpu.png" src="images/per-cpu.png" />
|
|
<p>The CPU stats are shown as a percentage and for the configured refresh
|
|
time. The total CPU usage is displayed on the first line.</p>
|
|
<div class="line-block">
|
|
<div class="line">If user|system CPU is <tt class="docutils literal"><50%</tt>, then status is set to <tt class="docutils literal">"OK"</tt></div>
|
|
<div class="line">If user|system CPU is <tt class="docutils literal">>50%</tt>, then status is set to <tt class="docutils literal">"CAREFUL"</tt></div>
|
|
<div class="line">If user|system CPU is <tt class="docutils literal">>70%</tt>, then status is set to <tt class="docutils literal">"WARNING"</tt></div>
|
|
<div class="line">If user|system CPU is <tt class="docutils literal">>90%</tt>, then status is set to <tt class="docutils literal">"CRITICAL"</tt></div>
|
|
</div>
|
|
<p><em>Note</em>: limit values can be overwritten in the configuration file under
|
|
the <tt class="docutils literal">[cpu]</tt> and/or <tt class="docutils literal">[percpu]</tt> sections.</p>
|
|
</div>
|
|
<div class="section" id="load">
|
|
<h2><a class="toc-backref" href="#id19">Load</a></h2>
|
|
<img alt="images/load.png" src="images/load.png" />
|
|
<p>On the <em>No Sheep</em> blog, <em>Zachary Tirrell</em> defines the load average <a class="footnote-reference" href="#id3" id="id1">[1]</a>:</p>
|
|
<blockquote>
|
|
"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 minutes time periods."</blockquote>
|
|
<p>Glances gets the number of CPU core to adapt the alerts.
|
|
Alerts on load average are only set on 15 minutes time period.
|
|
The first line also displays the number of CPU core.</p>
|
|
<div class="line-block">
|
|
<div class="line">If load average is <tt class="docutils literal"><0.7*core</tt>, then status is set to <tt class="docutils literal">"OK"</tt></div>
|
|
<div class="line">If load average is <tt class="docutils literal">>0.7*core</tt>, then status is set to <tt class="docutils literal">"CAREFUL"</tt></div>
|
|
<div class="line">If load average is <tt class="docutils literal">>1*core</tt>, then status is set to <tt class="docutils literal">"WARNING"</tt></div>
|
|
<div class="line">If load average is <tt class="docutils literal">>5*core</tt>, then status is set to <tt class="docutils literal">"CRITICAL"</tt></div>
|
|
</div>
|
|
<p><em>Note</em>: limit values can be overwritten in the configuration file under
|
|
the <tt class="docutils literal">[load]</tt> section.</p>
|
|
</div>
|
|
<div class="section" id="memory">
|
|
<h2><a class="toc-backref" href="#id20">Memory</a></h2>
|
|
<p>Glances uses two columns: one for the <tt class="docutils literal">RAM</tt> and one for the <tt class="docutils literal">SWAP</tt>.</p>
|
|
<img alt="images/mem.png" src="images/mem.png" />
|
|
<p>If enough space is available, Glances displays extended information for
|
|
the <tt class="docutils literal">RAM</tt>:</p>
|
|
<img alt="images/mem-wide.png" src="images/mem-wide.png" />
|
|
<p>Alerts are only set for used memory and used swap.</p>
|
|
<div class="line-block">
|
|
<div class="line">If used memory|swap is <tt class="docutils literal"><50%</tt>, then status is set to <tt class="docutils literal">"OK"</tt></div>
|
|
<div class="line">If used memory|swap is <tt class="docutils literal">>50%</tt>, then status is set to <tt class="docutils literal">"CAREFUL"</tt></div>
|
|
<div class="line">If used memory|swap is <tt class="docutils literal">>70%</tt>, then status is set to <tt class="docutils literal">"WARNING"</tt></div>
|
|
<div class="line">If used memory|swap is <tt class="docutils literal">>90%</tt>, then status is set to <tt class="docutils literal">"CRITICAL"</tt></div>
|
|
</div>
|
|
<p><em>Note</em>: limit values can be overwritten in the configuration file under
|
|
the <tt class="docutils literal">[memory]</tt> and/or <tt class="docutils literal">[memswap]</tt> sections.</p>
|
|
</div>
|
|
<div class="section" id="network">
|
|
<h2><a class="toc-backref" href="#id21">Network</a></h2>
|
|
<img alt="images/network.png" src="images/network.png" />
|
|
<p>Glances displays the network interface bit rate. The unit is adapted
|
|
dynamically (bits per second, kbits per second, Mbits per second, etc).</p>
|
|
<p>Alerts are only set if the maximum speed per network interface is available
|
|
(see sample in the configuration file).</p>
|
|
<p><em>Note</em>: it is possibile to define a list of network interfaces to hide
|
|
and per-interface limit values in the <tt class="docutils literal">[network]</tt> section of the
|
|
configuration file and aliases for interface name.</p>
|
|
</div>
|
|
<div class="section" id="disk-i-o">
|
|
<h2><a class="toc-backref" href="#id22">Disk I/O</a></h2>
|
|
<img alt="images/diskio.png" src="images/diskio.png" />
|
|
<p>Glances displays the disk I/O throughput. The unit is adapted dynamically.</p>
|
|
<p>There is no alert on this information.</p>
|
|
<p><em>Note</em>: it is possible to define a list of disks to hide under the
|
|
<tt class="docutils literal">[diskio]</tt> section in the configuration file and aliases for disk name.</p>
|
|
</div>
|
|
<div class="section" id="file-system">
|
|
<h2><a class="toc-backref" href="#id23">File System</a></h2>
|
|
<img alt="images/fs.png" src="images/fs.png" />
|
|
<p>Glances displays the used and total file system disk space. The unit is
|
|
adapted dynamically.</p>
|
|
<p>Alerts are set for used disk space.</p>
|
|
<div class="line-block">
|
|
<div class="line">If used disk is <tt class="docutils literal"><50%</tt>, then status is set to <tt class="docutils literal">"OK"</tt></div>
|
|
<div class="line">If used disk is <tt class="docutils literal">>50%</tt>, then status is set to <tt class="docutils literal">"CAREFUL"</tt></div>
|
|
<div class="line">If used disk is <tt class="docutils literal">>70%</tt>, then status is set to <tt class="docutils literal">"WARNING"</tt></div>
|
|
<div class="line">If used disk is <tt class="docutils literal">>90%</tt>, then status is set to <tt class="docutils literal">"CRITICAL"</tt></div>
|
|
</div>
|
|
<p><em>Note</em>: limit values can be overwritten in the configuration file under
|
|
the <tt class="docutils literal">[filesystem]</tt> section.</p>
|
|
<p>If a RAID controller is detected on you system, its status will be displayed:</p>
|
|
<img alt="images/raid.png" src="images/raid.png" />
|
|
</div>
|
|
<div class="section" id="sensors">
|
|
<h2><a class="toc-backref" href="#id24">Sensors</a></h2>
|
|
<p>Glances can displays the sensors information using <cite>lm-sensors</cite>,
|
|
<cite>hddtemp</cite> and <cite>batinfo</cite> <a class="footnote-reference" href="#id4" id="id2">[2]</a>.</p>
|
|
<p>All of the above libraries are available only on Linux.</p>
|
|
<p>As of lm-sensors, a filter is being applied in order to display
|
|
temperature only.</p>
|
|
<img alt="images/sensors.png" src="images/sensors.png" />
|
|
<p>There is no alert on this information.</p>
|
|
<p><em>Note</em>: limit values and sensors alias names can be defined in the configuration
|
|
file under the <tt class="docutils literal">[sensors]</tt> section.</p>
|
|
</div>
|
|
<div class="section" id="processes-list">
|
|
<h2><a class="toc-backref" href="#id25">Processes List</a></h2>
|
|
<p>Compact view:</p>
|
|
<img alt="images/processlist.png" src="images/processlist.png" />
|
|
<p>Full view:</p>
|
|
<img alt="images/processlist-wide.png" src="images/processlist-wide.png" />
|
|
<p>Three views are available for processes:</p>
|
|
<ul class="simple">
|
|
<li>Processes summary</li>
|
|
<li>Optional monitored processes list (see below)</li>
|
|
<li>Processes list</li>
|
|
</ul>
|
|
<p>The processes summary line display:</p>
|
|
<ul class="simple">
|
|
<li>Tasks number (total number of processes)</li>
|
|
<li>Threads number</li>
|
|
<li>Running tasks number</li>
|
|
<li>Sleeping tasks number</li>
|
|
<li>Other tasks number (not running or sleeping)</li>
|
|
<li>Sort key</li>
|
|
</ul>
|
|
<p>By default, or if you hit the <tt class="docutils literal">a</tt> key, the processes list is
|
|
automatically sorted by:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">CPU</tt> if there is no alert (default behavior)</li>
|
|
<li><tt class="docutils literal">CPU</tt> if a CPU or LOAD alert is detected</li>
|
|
<li><tt class="docutils literal">MEM</tt> if a memory alert is detected</li>
|
|
<li><tt class="docutils literal">Disk I/O</tt> if a CPU iowait alert is detected</li>
|
|
</ul>
|
|
<p>The number of processes in the list is adapted to the screen size.</p>
|
|
<dl class="docutils">
|
|
<dt><tt class="docutils literal">CPU%</tt></dt>
|
|
<dd>% of CPU used by the process</dd>
|
|
<dt><tt class="docutils literal">MEM%</tt></dt>
|
|
<dd>% of MEM used by the process</dd>
|
|
<dt><tt class="docutils literal">VIRT</tt></dt>
|
|
<dd>Total program size - Virtual Memory Size (VMS)</dd>
|
|
<dt><tt class="docutils literal">RES</tt></dt>
|
|
<dd>Resident Set Size (RSS)</dd>
|
|
<dt><tt class="docutils literal">PID</tt></dt>
|
|
<dd>Process ID</dd>
|
|
<dt><tt class="docutils literal">USER</tt></dt>
|
|
<dd>User ID</dd>
|
|
<dt><tt class="docutils literal">NI</tt></dt>
|
|
<dd>Nice level of the process (niceness other than 0 is highlighted)</dd>
|
|
<dt><tt class="docutils literal">S</tt></dt>
|
|
<dd>Process status (running process is highlighted)</dd>
|
|
<dt><tt class="docutils literal">TIME+</tt></dt>
|
|
<dd>Cumulative CPU time used</dd>
|
|
<dt><tt class="docutils literal">IOR/s</tt></dt>
|
|
<dd>Per process I/O read rate (in Byte/s)</dd>
|
|
<dt><tt class="docutils literal">IOW/s</tt></dt>
|
|
<dd>Per process I/O write rate (in Byte/s)</dd>
|
|
<dt><tt class="docutils literal">COMMAND</tt></dt>
|
|
<dd>Process command line
|
|
User cans switch to the process name by pressing on the <tt class="docutils literal">/</tt> key</dd>
|
|
</dl>
|
|
<p>Process status legend:</p>
|
|
<dl class="docutils">
|
|
<dt><tt class="docutils literal">R</tt></dt>
|
|
<dd>Running</dd>
|
|
<dt><tt class="docutils literal">S</tt></dt>
|
|
<dd>Sleeping (may be interrupted)</dd>
|
|
<dt><tt class="docutils literal">D</tt></dt>
|
|
<dd>Disk sleep (may not be interrupted)</dd>
|
|
<dt><tt class="docutils literal">T</tt></dt>
|
|
<dd>Traced / Stopped</dd>
|
|
<dt><tt class="docutils literal">Z</tt></dt>
|
|
<dd>Zombie</dd>
|
|
</dl>
|
|
<p>In standalone mode, additionals informations are provided for the top process:</p>
|
|
<img alt="images/processlist-top.png" src="images/processlist-top.png" />
|
|
<ul class="simple">
|
|
<li>CPU affinity (number of cores used by the process)</li>
|
|
<li>Extended memory information (swap, shared, text, lib, data and dirty on Linux)</li>
|
|
<li>Open threads, files and network sessions (TCP and UDP)</li>
|
|
<li>IO nice level</li>
|
|
</ul>
|
|
<p>The extended stats feature could be enabled using the --enable-process-extended option (command line) or the <tt class="docutils literal">e</tt> key (curses interface).</p>
|
|
<p><em>Note</em>: limit values can be overwritten in the configuration file under
|
|
the <tt class="docutils literal">[process]</tt> section.</p>
|
|
</div>
|
|
<div class="section" id="monitored-processes-list">
|
|
<h2><a class="toc-backref" href="#id26">Monitored Processes List</a></h2>
|
|
<p>The monitored processes list allows user, through the configuration file,
|
|
to group processes and quickly show if the number of running processes is
|
|
not good.</p>
|
|
<img alt="images/monitored.png" src="images/monitored.png" />
|
|
<p>Each item is defined by:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">description</tt>: description of the processes (max 16 chars).</li>
|
|
<li><tt class="docutils literal">regex</tt>: regular expression of the processes to monitor.</li>
|
|
<li><tt class="docutils literal">command</tt> (optional): full path to shell command/script for extended
|
|
stat. Should return a single line string. Use with caution.</li>
|
|
<li><tt class="docutils literal">countmin</tt> (optional): minimal number of processes. A warning will
|
|
be displayed if number of processes < count.</li>
|
|
<li><tt class="docutils literal">countmax</tt> (optional): maximum number of processes. A warning will
|
|
be displayed if number of processes > count.</li>
|
|
</ul>
|
|
<p>Up to 10 items can be defined.</p>
|
|
<p>For example, if you want to monitor the Nginx processes on a Web server,
|
|
the following definition should do the job:</p>
|
|
<pre class="literal-block">
|
|
[monitor]
|
|
list_1_description=Nginx server
|
|
list_1_regex=.*nginx.*
|
|
list_1_command=nginx -v
|
|
list_1_countmin=1
|
|
list_1_countmax=4
|
|
</pre>
|
|
<p>If you also want to monitor the PHP-FPM daemon processes, you should add
|
|
another item:</p>
|
|
<pre class="literal-block">
|
|
[monitor]
|
|
list_1_description=Nginx server
|
|
list_1_regex=.*nginx.*
|
|
list_1_command=nginx -v
|
|
list_1_countmin=1
|
|
list_1_countmax=4
|
|
list_1_description=PHP-FPM
|
|
list_1_regex=.*php-fpm.*
|
|
list_1_countmin=1
|
|
list_1_countmax=20
|
|
</pre>
|
|
<p>In client/server mode, the list is defined on the server side.
|
|
A new method, called <cite>getAllMonitored</cite>, is available in the APIs and
|
|
get the JSON representation of the monitored processes list.</p>
|
|
<p>Alerts are set as following:</p>
|
|
<div class="line-block">
|
|
<div class="line">If number of processes is 0, then status is set to <tt class="docutils literal">"CRITICAL"</tt></div>
|
|
<div class="line">If number of processes is min < current < max, then status is set to <tt class="docutils literal">"OK"</tt></div>
|
|
<div class="line">Else status is set to <tt class="docutils literal">"WARNING"</tt></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="logs">
|
|
<h2><a class="toc-backref" href="#id27">Logs</a></h2>
|
|
<img alt="images/logs.png" src="images/logs.png" />
|
|
<p>A log messages list is displayed in the bottom of the screen if (and
|
|
only if):</p>
|
|
<ul class="simple">
|
|
<li>at least one <tt class="docutils literal">WARNING</tt> or <tt class="docutils literal">CRITICAL</tt> alert was occurred</li>
|
|
<li>space is available in the bottom of the console/terminal</li>
|
|
</ul>
|
|
<p>Each alert message displays the following information:</p>
|
|
<ol class="arabic simple">
|
|
<li>start datetime</li>
|
|
<li>duration if alert is terminated or <cite>ongoing</cite> if the alert is still in
|
|
progress</li>
|
|
<li>alert name</li>
|
|
<li>{min,avg,max} values or number of running processes for monitored
|
|
processes list alerts</li>
|
|
</ol>
|
|
</div>
|
|
<div class="section" id="docker">
|
|
<h2><a class="toc-backref" href="#id28">Docker</a></h2>
|
|
<p>If you use Docker, Glances can help you to monitor your container. Glances uses the Docker API through the Docker-Py library.</p>
|
|
<img alt="images/docker.png" src="images/docker.png" />
|
|
</div>
|
|
<div class="section" id="actions">
|
|
<h2><a class="toc-backref" href="#id29">Actions</a></h2>
|
|
<p>Glances can trigger actions on events.</p>
|
|
<p>By action, we mean all shell command line. For example, if you want to execute the foo.py script if the last 5 minutes load are critical then add the action line to the Glances configuration file:</p>
|
|
<pre class="code literal-block">
|
|
[load]
|
|
critical=5.0
|
|
critical_action=python /path/to/foo.py
|
|
</pre>
|
|
<p>All the stats are available in the command line through the use of the {{mustache}} syntax. Another example to create a log file containing used vs total disk space if a space trigger warning is reached:</p>
|
|
<pre class="code literal-block">
|
|
[fs]
|
|
warning=70
|
|
warning_action=echo {{mnt_point}} {{used}}/{{size}} > /tmp/fs.alert
|
|
</pre>
|
|
<p><em>Note</em>: You can use all the stats for the current plugin (see <a class="reference external" href="https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to">https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to</a> for the stats list)</p>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="gateway-to-others-services">
|
|
<h1><a class="toc-backref" href="#id30">Gateway to others services</a></h1>
|
|
<p><em>CSV</em></p>
|
|
<p>It is possible to export statistics to CSV file.</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic prompt">$</span> glances --export-csv /tmp/glances.csv
|
|
</pre>
|
|
<p>CSV file description:
|
|
- Stats description (first line)
|
|
- Stats (others lines)</p>
|
|
<p><em>InfluxDB</em></p>
|
|
<p>You can export statistics to an InfluxDB server (time series server). The connection should be defined in the Glances configuration file as following:</p>
|
|
<pre class="code literal-block">
|
|
[influxdb]
|
|
host=localhost
|
|
port=8086
|
|
user=root
|
|
password=root
|
|
db=glances
|
|
</pre>
|
|
<p>and run Glances with:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic prompt">$</span> glances --export-influxdb
|
|
</pre>
|
|
<p><em>Statsd</em></p>
|
|
<p>You can export statistics to a Statsd server (welcome to Graphite !). The connection should be defined in the Glances configuration file as following:</p>
|
|
<pre class="code literal-block">
|
|
[statsd]
|
|
host=localhost
|
|
port=8125
|
|
prefix=glances
|
|
</pre>
|
|
<p>Note: the prefix option is optionnal ('glances by default')</p>
|
|
<p>and run Glances with:</p>
|
|
<pre class="code console literal-block">
|
|
<span class="generic prompt">$</span> glances --export-statsd
|
|
</pre>
|
|
<p>Glances will generate stats as:</p>
|
|
<pre class="code literal-block">
|
|
'glances.cpu.user': 12.5,
|
|
'glances.cpu.total': 14.9,
|
|
'glances.load.cpucore': 4,
|
|
'glances.load.min1': 0.19,
|
|
...
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="apis-documentations">
|
|
<h1><a class="toc-backref" href="#id31">APIs Documentations</a></h1>
|
|
<p>Glances includes a <a class="reference external" href="http://docs.python.org/2/library/simplexmlrpcserver.html">XML-RPC server</a> and a <a class="reference external" href="http://jsonapi.org/">RESTFUL-JSON</a> API which and can be used by another client software.</p>
|
|
<p>APIs documentations are available at:</p>
|
|
<ul class="simple">
|
|
<li>XML-RPC: <a class="reference external" href="https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to">https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to</a></li>
|
|
<li>RESTFUL-JSON: <a class="reference external" href="https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API">https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="support">
|
|
<h1><a class="toc-backref" href="#id32">Support</a></h1>
|
|
<p>To post a question about Glances use case, please post it to the offical Q&A <a class="reference external" href="https://groups.google.com/forum/?hl=en#!forum/glances-users">forum</a>.</p>
|
|
<p>To report a bug or a feature request use the bug tracking system at
|
|
<a class="reference external" href="https://github.com/nicolargo/glances/issues">https://github.com/nicolargo/glances/issues</a>.</p>
|
|
<p>Feel free to contribute !</p>
|
|
<table class="docutils footnote" frame="void" id="id3" rules="none">
|
|
<colgroup><col class="label" /><col /></colgroup>
|
|
<tbody valign="top">
|
|
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><a class="reference external" href="http://nosheep.net/story/defining-unix-load-average/">http://nosheep.net/story/defining-unix-load-average/</a></td></tr>
|
|
</tbody>
|
|
</table>
|
|
<table class="docutils footnote" frame="void" id="id4" rules="none">
|
|
<colgroup><col class="label" /><col /></colgroup>
|
|
<tbody valign="top">
|
|
<tr><td class="label"><a class="fn-backref" href="#id2">[2]</a></td><td><a class="reference external" href="https://github.com/nicolargo/batinfo">https://github.com/nicolargo/batinfo</a></td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|