提交 937f2faf 编写于 作者: A Alessio Sergi

Update doc

上级 23a65b56
......@@ -3,16 +3,17 @@
Applications Monitoring Process
===============================
Thanks to Glances and it AMP module, you can add specific monitoring
to running process. AMP are defined in the Glances configuration file.
Thanks to Glances and its AMP module, you can add specific monitoring to
running processes. AMPs are defined in the Glances configuration file.
You can disable AMP using the --disable-amps option or pressing the `A` shortkey.
You can disable AMP using the ``--disable-amps`` option or pressing the
``A`` key.
Simple AMP
----------
For example, a simple AMP which monitor the CPU/MEM of all Python processes
can be define using:
For example, a simple AMP that monitor the CPU/MEM of all Python
processes can be defined as follows:
.. code-block:: ini
......@@ -21,15 +22,17 @@ can be define using:
regex=.*python.*
refresh=3
Every 3 seconds (*refresh*) and if the *enable* key is true, Glances will
filter the running processes list thanks to the .*python.* regular
expression (*regex*). The default behavor for an AMP is to display:
the number of matching processes, the CPU and MEM:
Every 3 seconds (``refresh``) and if the ``enable`` key is true, Glances
will filter the running processes list thanks to the ``.*python.*``
regular expression (``regex``).
The default behavior for an AMP is to display the number of matching
processes, CPU and MEM:
.. image:: ../_static/amp-python.png
You can also define the minimum (*countmin*) and/or maximum (*countmax*) process
number. For example:
You can also define the minimum (``countmin``) and/or maximum
(``countmax``) process number. For example:
.. code-block:: ini
......@@ -40,17 +43,19 @@ number. For example:
countmin=1
countmax=2
With this configuration, if the number of running Python script is higher than 2
then the AMP is display with a purple color (red if < countmin):
With this configuration, if the number of running Python scripts is
higher than 2, then the AMP is displayed with a purple color (red if
less than countmin):
.. image:: ../_static/amp-python-warning.png
User define AMP
---------------
User defined AMP
----------------
If you need to execute a specific command line, you can use the *command* option.
For example, if you want to display the Dropbox process status, you can define the
following section in the Glances configuration file:
If you need to execute a specific command line, you can use the
``command`` option. For example, if you want to display the Dropbox
process status, you can define the following section in the Glances
configuration file:
.. code-block:: ini
......@@ -63,27 +68,29 @@ following section in the Glances configuration file:
command=dropbox status
countmin=1
The *dropbox status* command line will be executed and displayed in the Glances UI:
The ``dropbox status`` command line will be executed and displayed in
the Glances UI:
.. image:: ../_static/amp-dropbox.png
You can force Glances to display the result in one line setting the *one_line* to true.
Embeded AMP
-----------
You can force Glances to display the result in one line setting
``one_line`` to true.
Glances provides some specifics AMP scripts (replacing the *command* line) hosted
in the glances/amps folder. You can write your own AMP script to fill yours needs.
AMP scripts are located in the glances/amps folder and should be names glances_*.py.
An AMP script define an Amp class (GlancesAmp) with a mandatory update method.
The update method call the set_result method to set the AMP return string.
The return string is a string with one or more line (\n between lines).
Embedded AMP
------------
You can write your owns AMP and enable its from the configuration file.
The configuration file section should be named [amp_*].
Glances provides some specific AMP scripts (replacing the ``command``
line). You can write your own AMP script to fill your needs. AMP scripts
are located in the ``amps`` folder and should be named ``glances_*.py``.
An AMP script define an Amp class (``GlancesAmp``) with a mandatory
update method. The update method call the ``set_result`` method to set
the AMP return string. The return string is a string with one or more
line (\n between lines). To enable it, the configuration file section
should be named ``[amp_*]``.
For example, if you want to enable the Nginx AMP, the following definition
should do the job (NGinx AMP is provided by the Glances team as an example):
For example, if you want to enable the Nginx AMP, the following
definition should do the job (Nginx AMP is provided by the Glances team
as an example):
.. code-block:: ini
......@@ -94,7 +101,7 @@ should do the job (NGinx AMP is provided by the Glances team as an example):
one_line=false
status_url=http://localhost/nginx_status
Here is the result:
Here's the result:
.. image:: ../_static/amps.png
......
......@@ -3,23 +3,26 @@
GPU
===
The GPU plugin is **only** compatible with NVIDIA GPU. You also need to
install the Python `pynvml`_ library on our system.
The GPU plugin is **only** compatible with ``NVIDIA`` GPUs.
The GPU stats are shown as a percentage or value and for the configured
.. note::
You need to install the `nvidia-ml-py`_ library on your system.
The GPU stats are shown as a percentage of value and for the configured
refresh time. The total GPU usage is displayed on the first line, the
memory consumption on the second one.
.. image:: ../_static/gpu.png
If you click on the ``6`` short key, the per GPU view is displayed:
If you click on the ``6`` short key, the per-GPU view is displayed:
.. image:: ../_static/pergpu.png
Note: you can also start Glances with the --meangpu option to display the
first view by default.
.. note::
You can also start Glances with the ``--meangpu`` option to display
the first view by default.
You can change the thresolds limits in the configuration file:
You can change the threshold limits in the configuration file:
.. code-block:: ini
......@@ -35,13 +38,13 @@ You can change the thresolds limits in the configuration file:
Legend:
================= ============
GPU (PROC/MEM) Status
================= ============
``<50%`` ``OK``
``>50%`` ``CAREFUL``
``>70%`` ``WARNING``
``>90%`` ``CRITICAL``
================= ============
============== ============
GPU (PROC/MEM) Status
============== ============
``<50%`` ``OK``
``>50%`` ``CAREFUL``
``>70%`` ``WARNING``
``>90%`` ``CRITICAL``
============== ============
.. _pynvml: https://pypi.python.org/pypi/nvidia-ml-py
.. _nvidia-ml-py: https://pypi.python.org/pypi/nvidia-ml-py
......@@ -11,8 +11,8 @@ Additionally, on GNU/Linux, it also shows the kernel version.
In client mode, the server connection status is also displayed.
If you are hosted on an AWS EC2 instance, some additional information
can be displayed (AMI-ID, region).
If you are hosted on an ``AWS EC2`` instance, some additional
information can be displayed (AMI-ID, region).
**Connected**:
......
......@@ -3,14 +3,20 @@
IRQ
===
*Availability: Linux*
.. image:: ../_static/irq.png
Glances displays the top 5 interrupts rate. This plugin is only available on
GNU/Linux machine (stats are grabbed from the /proc/interrupts file).
Glances displays the top ``5`` interrupts rate.
This plugin is only available on GNU/Linux (stats are grabbed from the
``/proc/interrupts`` file).
Note: /proc/interrupts file did not exist inside OpenVZ containers.
.. note::
``/proc/interrupts`` file doesn't exist inside OpenVZ containers.
How to read the informations:
How to read the information:
* The first Column is the IRQ number / name
* The Second column says how many times the CPU core has been interrupted during the last second
- The first column is the IRQ number / name
- The second column says how many times the CPU has been interrupted
during the last second
......@@ -3,6 +3,6 @@
Monitored Processes List
========================
The monitored processes list is deprecated.
Please use the Application Monitoring Process (AMP).
.. warning::
The monitored processes list feature has been removed. Use the new
Application Monitoring Process (AMP) instead.
......@@ -9,9 +9,10 @@ Ports
This plugin aims at providing a list of hosts/port to scan.
You can define ICMP or TCP ports scan.
You can define ``ICMP`` or ``TCP`` ports scan.
The list should be define in the ``[ports]`` section of the Glances configuration file.
The list should be defined in the ``[ports]`` section of the Glances
configuration file.
.. code-block:: ini
......
......@@ -52,22 +52,25 @@ Columns display
``VIRT`` Virtual Memory Size
The total amount of virtual memory used by the
process. It includes all code, data and shared
process.
It includes all code, data and shared
libraries plus pages that have been swapped out
and pages that have been mapped but not used.
``RES`` Resident Memory Size
The non-swapped physical memory a process is
using (what's currently in the physical memory).
using (what's currently in the physical memory).
``PID`` Process ID
``USER`` User ID
``NI`` Nice level of the process
``S`` Process status
The status of the process:
- ``R``: running or runnable (on run queue)
- ``S``: interruptible sleep (waiting for an event)
- ``D``: uninterruptible sleep (usually IO)
- ``D``: uninterruptible sleep (usually I/O)
- ``Z``: defunct ("zombie") process
- ``T``: traced/stopped by job control signal
- ``X``: dead (should never be seen)
......@@ -88,10 +91,12 @@ 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*
- ``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*
Extended info
-------------
......
......@@ -7,10 +7,8 @@ Sensors
.. image:: ../_static/sensors.png
Glances can displays the sensors information using ``PsUtil`` and ``hddtemp``.
As of ``lm-sensors``, a filter is being applied in order to display
temperature and fan speed only.
Glances can displays the sensors information using ``psutil`` and/or
``hddtemp``.
There is no alert on this information.
......
.. _wifi:
Wifi
Wi-Fi
=====
*Availability: Linux*
.. image:: ../_static/wifi.png
Glances displays the Wifi hotspots' name and signal quality.
If Glances is ran as root, then all the available hotspots are displayed.
Glances displays the Wi-Fi hotspot names and signal quality. If Glances
is ran as root, then all the available hotspots are displayed.
In the configuration file, you can define signal quality thresholds.
"Poor" quality is between -100 and -85dBm, "Good" quality between -85
and -60dBm, and "Excellent" between -60 and -40dBm.
.. note::
You need to install the ``wireless-tools`` package on your system.
In the configuration file, you can define signal quality thresholds:
- ``"Poor"`` quality is between -100 and -85dBm
- ``"Good"`` quality between -85 and -60dBm
- ``"Excellent"`` between -60 and -40dBm
It's also possible to disable the scan on a specific interface from the
configuration file (``[wifi]`` section). For example, if you want to
......@@ -27,5 +32,5 @@ hide the loopback interface (lo) and all the virtual docker interfaces:
warning=-75
critical=-85
You can disable this plugin using the --disable-wifi option or by heating
the 'W' from the user interface.
You can disable this plugin using the ``--disable-wifi`` option or by
hitting the ``W`` key from the user interface.
......@@ -16,7 +16,7 @@ Command-Line Options
.. option:: -d, --debug
enable debug mode. The debugging output is saved to /tmp/glances-USERNAME.log.
enable debug mode
.. option:: -C CONF_FILE, --config CONF_FILE
......@@ -112,8 +112,7 @@ Command-Line Options
.. option:: -2, --disable-left-sidebar
disable network, disk I/O, FS and sensors modules (py3sensors lib
needed)
disable network, disk I/O, FS and sensors modules
.. option:: -3, --disable-quicklook
......@@ -323,8 +322,7 @@ The following commands (key pressed) are supported while in Glances:
``ENTER``
Set the process filter
**Note**: on macOS, please use ``CTRL-H`` to delete
filter.
.. note:: On macOS please use ``CTRL-H`` to delete filter.
Filter is a regular expression pattern:
......@@ -462,6 +460,8 @@ The following commands (key pressed) are supported while in Glances:
``5``
Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
``6``
Enable/disable mean GPU mode
``/``
Switch between process command line or command name
......
......@@ -23,8 +23,8 @@ You can put your own ``glances.conf`` file in the following locations:
``Windows`` %APPDATA%\\glances
==================== =============================================================
* On Windows XP, ``%APPDATA%`` is: ``C:\Documents and Settings\<USERNAME>\Application Data``.
* On Windows Vista and later: ``C:\Users\<USERNAME>\AppData\Roaming``.
- On Windows XP, ``%APPDATA%`` is: ``C:\Documents and Settings\<USERNAME>\Application Data``.
- On Windows Vista and later: ``C:\Users\<USERNAME>\AppData\Roaming``.
User-specific options override system-wide options and options given on
the command line override either.
......@@ -103,8 +103,8 @@ By default, the ``glances-USERNAME.log`` file is under the temporary directory:
``Windows`` %TEMP%
=========== ======
* On Windows XP, ``%TEMP%`` is: ``C:\Documents and Settings\<USERNAME>\Local Settings\Temp``.
* On Windows Vista and later: ``C:\Users\<USERNAME>\AppData\Local\Temp``.
- On Windows XP, ``%TEMP%`` is: ``C:\Documents and Settings\<USERNAME>\Local Settings\Temp``.
- On Windows Vista and later: ``C:\Users\<USERNAME>\AppData\Local\Temp``.
If you want to use another system path or change the log message, you
can use your own logger configuration. First of all, you have to create
......
......@@ -3,7 +3,7 @@
Cassandra
=========
You can export statistics to an ``Cassandra`` or ``Scylla`` server.
You can export statistics to a ``Cassandra`` or ``Scylla`` server.
The connection should be defined in the Glances configuration file as
following:
......@@ -29,5 +29,6 @@ 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.
Only numerical stats are stored in the Cassandra table. All the stats
are converted to float. If a stat cannot be converted to float, it is
not stored in the database.
......@@ -22,14 +22,15 @@ and run Glances with:
$ glances --export-couchdb
Documents are stored in native JSON format. Glances adds "type" and "time" entries.
Documents are stored in native ``JSON`` format. Glances adds ``"type"``
and ``"time"`` entries:
- type: plugin name
- time: timestamp (format: "2016-09-24T16:39:08.524828Z")
- ``type``: plugin name
- ``time``: timestamp (format: "2016-09-24T16:39:08.524828Z")
Example of Couch Document for the load stats:
.. code-block:: console
.. code-block:: json
{
"_id": "36cbbad81453c53ef08804cb2612d5b6",
......@@ -46,4 +47,4 @@ Example of Couch Document for the load stats:
"load_careful": 0.7
}
You can view the result using the CouchDB utils URL (http://127.0.0.1:5984/_utils/database.html?glances).
You can view the result using the CouchDB utils URL: http://127.0.0.1:5984/_utils/database.html?glances.
......@@ -3,7 +3,7 @@
Elasticsearch
=============
You can export statistics to an ``elasticsearch`` server. The connection
You can export statistics to an ``Elasticsearch`` server. The connection
should be defined in the Glances configuration file as following:
.. code-block:: ini
......
......@@ -23,9 +23,9 @@ and run Glances with:
$ glances --export-influxdb
Glances generates a lot of column (for example if you have many running Docker
containers). You should use the *tsm1* engine in the InfluxDB configuration
file (no limit on column number).
Glances generates a lot of columns, e.g., if you have many running
Docker containers, so you should use the ``tsm1`` engine in the InfluxDB
configuration file (no limit on columns number).
Grafana
-------
......
......@@ -15,12 +15,12 @@ following:
port=5678
prefix=G
Note: Glances `envelopes`_ the stats before publishing it.
The message is composed of three frames.
Glances `envelopes`_ the stats before publishing it. The message is
composed of three frames:
- first frame containing the prefix configured in the [zeromq] section (as STRING)
- second frame with the Glances plugin name (as STRING)
- third frame with the Glances plugin stats (as JSON)
1. the prefix configured in the [zeromq] section (as STRING)
2. the Glances plugin name (as STRING)
3. the Glances plugin stats (as JSON)
Run Glances with:
......
......@@ -18,24 +18,21 @@ For Fedora/CentOS/RHEL install first *python-devel* package. For Windows,
just install PsUtil from the binary installation file.
You can also install the following libraries in order to use optional
features (like the Web interface, exports modules, sensors...):
features (like the Web interface, export modules...):
.. code-block:: console
curl -o /tmp/optional-requirements.txt https://raw.githubusercontent.com/nicolargo/glances/master/optional-requirements.txt
pip install -r /tmp/optional-requirements.txt
pip install glances[action,browser,cloud,cpuinfo,chart,docker,export,folders,gpu,ip,raid,snmp,web,wifi]
To upgrade Glances and all its dependencies to the latests versions:
To upgrade Glances and all its dependencies to the latest versions:
.. code-block:: console
pip install --upgrade glances
curl -o /tmp/requirements.txt https://raw.githubusercontent.com/nicolargo/glances/master/requirements.txt
pip install --upgrade /tmp/requirements.txt
curl -o /tmp/optional-requirements.txt https://raw.githubusercontent.com/nicolargo/glances/master/optional-requirements.txt
pip install --upgrade /tmp/optional-requirements.txt
pip install --upgrade psutil
pip install --upgrade glances[...]
For additionnal installation methods, read the official `README`_ file.
For additional installation methods, read the official `README`_ file.
.. _psutil: https://github.com/giampaolo/psutil
.. _README: https://github.com/nicolargo/glances/blob/master/README.rst
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册