mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-25 19:17:09 +03:00
Update documentation for the 2.0
This commit is contained in:
parent
31e93e5c14
commit
64a6108b37
@ -33,8 +33,7 @@ Requirements
|
|||||||
|
|
||||||
Optional dependencies:
|
Optional dependencies:
|
||||||
|
|
||||||
- ``bottle`` (for web server mode)
|
- ``bottle`` (for Web Server mode)
|
||||||
- ``jinja2`` (for HTML output)
|
|
||||||
- ``py3sensors`` (for HW monitoring support) [Linux-only]
|
- ``py3sensors`` (for HW monitoring support) [Linux-only]
|
||||||
- ``hddtemp`` (for HDD temperature monitoring support)
|
- ``hddtemp`` (for HDD temperature monitoring support)
|
||||||
- ``batinfo`` (for battery monitoring support) [Linux-only]
|
- ``batinfo`` (for battery monitoring support) [Linux-only]
|
||||||
@ -100,7 +99,7 @@ To install Glances from ports:
|
|||||||
OS X
|
OS X
|
||||||
----
|
----
|
||||||
|
|
||||||
OS X users can also install Glances using `Homebrew`_ or `MacPorts`_.
|
OS X users can install Glances using `Homebrew`_ or `MacPorts`_.
|
||||||
|
|
||||||
Homebrew
|
Homebrew
|
||||||
````````
|
````````
|
||||||
@ -137,11 +136,11 @@ Otherwise, you have to follow these steps:
|
|||||||
Source
|
Source
|
||||||
------
|
------
|
||||||
|
|
||||||
To install Glances from source:
|
To install Glances version X.Y from source:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ curl -L https://github.com/nicolargo/glances/archive/vX.X.tar.gz -o glances-X.X.tar.gz
|
$ curl -L https://github.com/nicolargo/glances/archive/vX.Y.tar.gz -o glances-X.Y.tar.gz
|
||||||
$ tar -zxvf glances-*.tar.gz
|
$ tar -zxvf glances-*.tar.gz
|
||||||
$ cd glances-*
|
$ cd glances-*
|
||||||
# python setup.py install
|
# python setup.py install
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
Glances
|
Glances
|
||||||
=======
|
=======
|
||||||
|
|
||||||
This manual describes *Glances* version 1.7.4.
|
This manual describes *Glances* version 2.0.
|
||||||
|
|
||||||
Copyright © 2012-2014 Nicolas Hennion <nicolas@nicolargo.com>
|
Copyright © 2012-2014 Nicolas Hennion <nicolas@nicolargo.com>
|
||||||
|
|
||||||
January 2014
|
May 2014
|
||||||
|
|
||||||
.. contents:: Table of Contents
|
.. contents:: Table of Contents
|
||||||
|
|
||||||
@ -45,8 +45,7 @@ Simply run:
|
|||||||
Client/Server mode
|
Client/Server mode
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
If you want to remotely monitor a machine, called ``server``, from another one, called ``client``,
|
If you want to remotely monitor a machine, called ``server``, from another one, called ``client``, just run on the server:
|
||||||
just run on the server:
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@ -68,44 +67,65 @@ Default binding address is ``0.0.0.0`` (Glances will listen on all the network i
|
|||||||
|
|
||||||
In client/server mode, limits are set by the server side.
|
In client/server mode, limits are set by the server side.
|
||||||
|
|
||||||
You can also set a password to access to the server ``-P password``.
|
You can also set a password to access to the server ``--password``.
|
||||||
|
|
||||||
Glances is ``IPv6`` compatible. Just use the ``-B ::`` option to bind to all IPv6 addresses.
|
Glances is ``IPv6`` compatible. Just use the ``-B ::`` option to bind to all IPv6 addresses.
|
||||||
|
|
||||||
|
If Glances server is not detected by the client, this last one try to grab stats using the SNMP protocol:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
client$ glances -c @snmpserver
|
||||||
|
|
||||||
|
Known limitation: Grab using SNMP is only validated for GNU/Linux operating system.
|
||||||
|
|
||||||
Command reference
|
Command reference
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Command-line options
|
Command-line options
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
-b Display network rate in Byte per second (default: bit per second)
|
-h, --help show this help message and exit
|
||||||
-B IP Bind server to the given IPv4/IPv6 address or hostname
|
--version show program's version number and exit
|
||||||
-c IP Connect to a Glances server by IPv4/IPv6 address or hostname
|
-b, --byte display network rate in byte per second
|
||||||
-C FILE Path to the configuration file
|
-B BIND_ADDRESS, --bind BIND_ADDRESS
|
||||||
-d Disable disk I/O module
|
bind server to the given IPv4/IPv6 address or hostname
|
||||||
-e Enable sensors module (requires pysensors, Linux-only)
|
-c CLIENT, --client CLIENT
|
||||||
-f FILE Set the HTML output folder or CSV file
|
connect to a Glances server by IPv4/IPv6 address or
|
||||||
-h Display the help and exit
|
hostname
|
||||||
-m Disable mount module
|
-C CONF_FILE, --config CONF_FILE
|
||||||
-n Disable network module
|
path to the configuration file
|
||||||
-o OUTPUT Define additional output (available: HTML or CSV)
|
--disable-bold disable bold mode in the terminal
|
||||||
-p PORT Define the client/server TCP port (default: 61209)
|
--disable-diskio disable disk I/O module
|
||||||
-P PASSWORD Define a client/server password
|
--disable-fs disable filesystem module
|
||||||
--password Define a client/server password from the prompt
|
--disable-network disable network module
|
||||||
-r Disable process list (for low CPU consumption)
|
--disable-sensors disable sensors module
|
||||||
-s Run Glances in server mode
|
--disable-process disable process module
|
||||||
-t SECONDS Set refresh time in seconds (default: 3 sec)
|
--disable-log disable log module
|
||||||
-v Display the version and exit
|
--output-csv OUTPUT_CSV
|
||||||
-y Enable hddtemp module (requires hddtemp)
|
export stats to a csv file
|
||||||
-z Do not use the bold color attribute
|
-p PORT, --port PORT define the client/server TCP port [default: 61209]
|
||||||
-1 Start Glances in per-CPU mode
|
--password define a client/server password from the prompt/file
|
||||||
|
-s, --server run Glances in server mode
|
||||||
|
--snmp-community SNMP_COMMUNITY
|
||||||
|
SNMP community
|
||||||
|
--snmp-port SNMP_PORT
|
||||||
|
SNMP port
|
||||||
|
--snmp-version SNMP_VERSION
|
||||||
|
SNMP version (1, 2c or 3)
|
||||||
|
--snmp-user SNMP_USER
|
||||||
|
SNMP username (only for SNMPv3)
|
||||||
|
--snmp-auth SNMP_AUTH
|
||||||
|
SNMP authentication key (only for SNMPv3)
|
||||||
|
-t TIME, --time TIME set refresh time in seconds [default: 3 sec]
|
||||||
|
-w, --webserver run Glances in web server mode
|
||||||
|
-1, --percpu start Glances in per CPU mode
|
||||||
|
|
||||||
Interactive commands
|
Interactive commands
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
The following commands (key pressed) are supported while in Glances:
|
The following commands (key pressed) are supported while in Glances:
|
||||||
|
|
||||||
|
|
||||||
``a``
|
``a``
|
||||||
Sort process list automatically
|
Sort process list automatically
|
||||||
|
|
||||||
@ -135,7 +155,7 @@ The following commands (key pressed) are supported while in Glances:
|
|||||||
``q``
|
``q``
|
||||||
Quit
|
Quit
|
||||||
``s``
|
``s``
|
||||||
Show/hide sensors stats (only available with -e flag)
|
Show/hide sensors stats
|
||||||
``t``
|
``t``
|
||||||
View network I/O as combination
|
View network I/O as combination
|
||||||
``u``
|
``u``
|
||||||
@ -145,7 +165,7 @@ The following commands (key pressed) are supported while in Glances:
|
|||||||
``x``
|
``x``
|
||||||
Delete finished warning and critical log messages
|
Delete finished warning and critical log messages
|
||||||
``y``
|
``y``
|
||||||
Show/hide hddtemp stats (only available with -y flag)
|
Show/hide hddtemp stats
|
||||||
``1``
|
``1``
|
||||||
Switch between global CPU and per-CPU stats
|
Switch between global CPU and per-CPU stats
|
||||||
|
|
||||||
@ -202,8 +222,10 @@ Header
|
|||||||
|
|
||||||
.. image:: images/header.png
|
.. image:: images/header.png
|
||||||
|
|
||||||
The header shows the hostname, OS name, release version, platform architecture and system uptime.
|
The header shows the hostname, OS name, release version, platform architecture and system uptime (on the upper right).
|
||||||
On Linux, it shows also the kernel version.
|
Additionnaly, on GNU/Linux operating system, it shows also the kernel version.
|
||||||
|
|
||||||
|
In client mode, the server connection status is displayed (Connected or Disconnected)
|
||||||
|
|
||||||
CPU
|
CPU
|
||||||
---
|
---
|
||||||
@ -225,10 +247,10 @@ To switch to per-CPU stats, just hit the ``1`` key:
|
|||||||
The CPU stats are shown as a percentage and for the configured refresh time.
|
The CPU stats are shown as a percentage and for the configured refresh time.
|
||||||
The total CPU usage is displayed on the first line.
|
The total CPU usage is displayed on the first line.
|
||||||
|
|
||||||
| If user|system|nice CPU is ``<50%``, then status is set to ``"OK"``
|
| If user|system|iowait CPU is ``<50%``, then status is set to ``"OK"``
|
||||||
| If user|system|nice CPU is ``>50%``, then status is set to ``"CAREFUL"``
|
| If user|system|iowait CPU is ``>50%``, then status is set to ``"CAREFUL"``
|
||||||
| If user|system|nice CPU is ``>70%``, then status is set to ``"WARNING"``
|
| If user|system|iowait CPU is ``>70%``, then status is set to ``"WARNING"``
|
||||||
| If user|system|nice CPU is ``>90%``, then status is set to ``"CRITICAL"``
|
| If user|system|iowait CPU is ``>90%``, then status is set to ``"CRITICAL"``
|
||||||
|
|
||||||
*Note*: limit values can be overwritten in the configuration file under the ``[cpu]`` section.
|
*Note*: limit values can be overwritten in the configuration file under the ``[cpu]`` section.
|
||||||
|
|
||||||
@ -241,10 +263,10 @@ On the *No Sheep* blog, *Zachary Tirrell* defines the average load [1]_:
|
|||||||
|
|
||||||
"In short it is the average sum of the number of processes
|
"In short it is the average sum of the number of processes
|
||||||
waiting in the run-queue plus the number currently executing
|
waiting in the run-queue plus the number currently executing
|
||||||
over 1, 5, and 15 minute time periods."
|
over 1, 5, and 15 minutes time periods."
|
||||||
|
|
||||||
Glances gets the number of CPU core to adapt the alerts.
|
Glances gets the number of CPU core to adapt the alerts.
|
||||||
Alerts on average load are only set on 5 and 15 min.
|
Alerts on average load are only set on 15 minutes time period.
|
||||||
The first line also display the number of CPU core.
|
The first line also display the number of CPU core.
|
||||||
|
|
||||||
| If average load is ``<0.7*core``, then status is set to ``"OK"``
|
| If average load is ``<0.7*core``, then status is set to ``"OK"``
|
||||||
@ -257,15 +279,15 @@ The first line also display the number of CPU core.
|
|||||||
Memory
|
Memory
|
||||||
------
|
------
|
||||||
|
|
||||||
Glances uses two columns: one for the ``RAM`` and another one for the ``Swap``.
|
Glances uses two columns: one for the ``RAM`` and another one for the ``SWAP``.
|
||||||
|
|
||||||
.. image:: images/mem.png
|
.. image:: images/mem.png
|
||||||
|
|
||||||
If enough space is available, Glances displays extended informations:
|
If enough space is available, Glances displays extended informations for the ``RAM``:
|
||||||
|
|
||||||
.. image:: images/mem-wide.png
|
.. image:: images/mem-wide.png
|
||||||
|
|
||||||
With Glances, alerts are only set for on used memory and used swap.
|
With Glances, alerts are only set for used memory and swap.
|
||||||
|
|
||||||
| If memory is ``<50%``, then status is set to ``"OK"``
|
| If memory is ``<50%``, then status is set to ``"OK"``
|
||||||
| If memory is ``>50%``, then status is set to ``"CAREFUL"``
|
| If memory is ``>50%``, then status is set to ``"CAREFUL"``
|
||||||
@ -297,29 +319,16 @@ if the bit rate is higher than 70 Mbps.
|
|||||||
Sensors
|
Sensors
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Glances can displays the sensors informations trough `lm-sensors` (only available on Linux).
|
Glances can displays the sensors information trough `lm-sensors` (only available on GNU/Linux).
|
||||||
|
|
||||||
As of lm-sensors, a filter is processed in order to display temperature only:
|
As of lm-sensors, a filter is processed in order to display temperature only:
|
||||||
|
|
||||||
.. image:: images/sensors.png
|
.. image:: images/sensors.png
|
||||||
|
|
||||||
|
|
||||||
Glances can also grab hard disk temperature through the `hddtemp` daemon (see here [2]_ to install hddtemp on your system):
|
Glances can also grab hard disk temperature through the `hddtemp` daemon (see here [2]_ to install hddtemp on your system):
|
||||||
|
|
||||||
.. image:: images/hddtemp.png
|
.. image:: images/hddtemp.png
|
||||||
|
|
||||||
To enable the lm-sensors module:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
$ glances -e
|
|
||||||
|
|
||||||
To enable the hddtemp module:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
$ glances -y
|
|
||||||
|
|
||||||
There is no alert on this information.
|
There is no alert on this information.
|
||||||
|
|
||||||
*Note*: limit values can be overwritten in the configuration file under the ``[temperature]`` and ``[hddtemperature]`` sections.
|
*Note*: limit values can be overwritten in the configuration file under the ``[temperature]`` and ``[hddtemperature]`` sections.
|
||||||
@ -366,7 +375,7 @@ Full view:
|
|||||||
Three views are available for processes:
|
Three views are available for processes:
|
||||||
|
|
||||||
* Processes summary
|
* Processes summary
|
||||||
* Optional monitored processes list (new in 1.7)
|
* Optional monitored processes list
|
||||||
* Processes list
|
* Processes list
|
||||||
|
|
||||||
The processes summary line display:
|
The processes summary line display:
|
||||||
@ -378,55 +387,58 @@ The processes summary line display:
|
|||||||
* Other tasks number (not running or sleeping)
|
* Other tasks number (not running or sleeping)
|
||||||
|
|
||||||
By default, or if you hit the ``a`` key, the processes list is automatically
|
By default, or if you hit the ``a`` key, the processes list is automatically
|
||||||
sorted by CPU of memory usage.
|
sorted by:
|
||||||
|
|
||||||
*Note*: limit values can be overwritten in the configuration file under the ``[process]`` section.
|
* CPU if there is no alert (default behavor)
|
||||||
|
* CPU if a CPU or LOAD alert is detected
|
||||||
|
* MEM if a memory alert is detected
|
||||||
|
* DiskIO if a CPU IOWait alert is detected
|
||||||
|
|
||||||
The number of processes in the list is adapted to the screen size.
|
The number of processes in the list is adapted to the screen size.
|
||||||
|
|
||||||
``VIRT``
|
|
||||||
Total program size (VMS)
|
|
||||||
``RES``
|
|
||||||
Resident set size (RSS)
|
|
||||||
``CPU%``
|
``CPU%``
|
||||||
% of CPU used by the process
|
% of CPU used by the process
|
||||||
``MEM%``
|
``MEM%``
|
||||||
% of MEM used by the process
|
% of MEM used by the process
|
||||||
|
``VIRT``
|
||||||
|
Total program size (VMS)
|
||||||
|
``RES``
|
||||||
|
Resident set size (RSS)
|
||||||
``PID``
|
``PID``
|
||||||
Process ID
|
Process ID
|
||||||
``USER``
|
``USER``
|
||||||
User ID per process
|
User ID
|
||||||
``NI``
|
``NI``
|
||||||
Nice level of the process
|
Nice level of the process
|
||||||
``S``
|
``S``
|
||||||
Process status
|
Process status (see details bellow)
|
||||||
``TIME+``
|
``TIME+``
|
||||||
Cumulative CPU time used
|
Cumulative CPU time used
|
||||||
``IOR/s``
|
``IOR/s``
|
||||||
Per process IO read rate (in Byte/s)
|
Per process IO read rate (in Byte/s)
|
||||||
``IOW/s``
|
``IOW/s``
|
||||||
Per process IO write rate (in Byte/s)
|
Per process IO write rate (in Byte/s)
|
||||||
``NAME``
|
``COMMAND``
|
||||||
Process name or command line
|
Process command line
|
||||||
|
|
||||||
Process status legend:
|
Process Status legend:
|
||||||
|
|
||||||
``R``
|
``R``
|
||||||
running
|
Running
|
||||||
``S``
|
``S``
|
||||||
sleeping (may be interrupted)
|
Sleeping (may be interrupted)
|
||||||
``D``
|
``D``
|
||||||
disk sleep (may not be interrupted)
|
Disk sleep (may not be interrupted)
|
||||||
``T``
|
``T``
|
||||||
traced/stopped
|
Traced / Stopped
|
||||||
``Z``
|
``Z``
|
||||||
zombie
|
Zombie
|
||||||
|
|
||||||
|
*Note*: limit values can be overwritten in the configuration file under the ``[process]`` section.
|
||||||
|
|
||||||
Monitored processes list
|
Monitored processes list
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
New in version 1.7. Optional.
|
|
||||||
|
|
||||||
The monitored processes list allows user, through the configuration file,
|
The monitored processes list allows user, through the configuration file,
|
||||||
to group processes and quickly show if the number of running process is not good.
|
to group processes and quickly show if the number of running process is not good.
|
||||||
|
|
||||||
@ -494,31 +506,6 @@ Each alert message displays the following information:
|
|||||||
3. alert name
|
3. alert name
|
||||||
4. {min/avg/max} values or number of running processes for monitored processes list alerts
|
4. {min/avg/max} values or number of running processes for monitored processes list alerts
|
||||||
|
|
||||||
Footer
|
|
||||||
------
|
|
||||||
|
|
||||||
.. image:: images/footer.png
|
|
||||||
|
|
||||||
Glances displays the current date & time and access to the embedded help screen.
|
|
||||||
|
|
||||||
If one or mode batteries were found on your machine and if the batinfo Python library [3]_
|
|
||||||
is installed on your system then Glances displays the available percent capacity in the middle on the footer.
|
|
||||||
|
|
||||||
.. image:: images/battery.png
|
|
||||||
|
|
||||||
If you have ran Glances in client mode ``-c``, you can also see if the client is connected to the server.
|
|
||||||
|
|
||||||
If client is connected:
|
|
||||||
|
|
||||||
.. image:: images/client-connected.png
|
|
||||||
|
|
||||||
else:
|
|
||||||
|
|
||||||
.. image:: images/client-disconnected.png
|
|
||||||
|
|
||||||
On the left, you can easily see if you are connected to a Glances server.
|
|
||||||
|
|
||||||
|
|
||||||
API documentation
|
API documentation
|
||||||
=================
|
=================
|
||||||
|
|
||||||
@ -529,24 +516,16 @@ API documentation is available at https://github.com/nicolargo/glances/wiki/The-
|
|||||||
Others outputs
|
Others outputs
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Thanks to the -o option, it is possible to export statistics to CSV or HTML files.
|
It is possible to export statistics to CSV file.
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ glances -o CSV -f /tmp/glances.csv
|
$ glances --output-csv /tmp/glances.csv
|
||||||
|
|
||||||
CSV files have on line per stats:
|
CSV files have two lines per stat:
|
||||||
|
|
||||||
- load,load1,load5,load15
|
- Stats description
|
||||||
- mem,total,used,free
|
- Stats (comma separated)
|
||||||
- swap,total,used,free
|
|
||||||
- cpu,user,system,nice,idel,iowait,irq
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
$ glances -o HTML -f /tmp
|
|
||||||
|
|
||||||
Note: The css and img folders (glances/data) should be in the /tmp folder
|
|
||||||
|
|
||||||
Support
|
Support
|
||||||
=======
|
=======
|
||||||
|
Loading…
Reference in New Issue
Block a user