Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
f568daa3
G
glances
项目概览
蜕变的菜鸟
/
glances
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
glances
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f568daa3
编写于
3月 15, 2017
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/nicolargo/glances
into develop
上级
9a46f085
937f2faf
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
141 addition
and
117 deletion
+141
-117
docs/aoa/amps.rst
docs/aoa/amps.rst
+41
-34
docs/aoa/gpu.rst
docs/aoa/gpu.rst
+19
-16
docs/aoa/header.rst
docs/aoa/header.rst
+2
-2
docs/aoa/irq.rst
docs/aoa/irq.rst
+12
-6
docs/aoa/monitor.rst
docs/aoa/monitor.rst
+3
-3
docs/aoa/ports.rst
docs/aoa/ports.rst
+3
-2
docs/aoa/ps.rst
docs/aoa/ps.rst
+12
-7
docs/aoa/sensors.rst
docs/aoa/sensors.rst
+2
-4
docs/aoa/wifi.rst
docs/aoa/wifi.rst
+13
-8
docs/cmds.rst
docs/cmds.rst
+5
-5
docs/config.rst
docs/config.rst
+4
-4
docs/gw/cassandra.rst
docs/gw/cassandra.rst
+4
-3
docs/gw/couchdb.rst
docs/gw/couchdb.rst
+6
-5
docs/gw/elastic.rst
docs/gw/elastic.rst
+1
-1
docs/gw/influxdb.rst
docs/gw/influxdb.rst
+3
-3
docs/gw/zeromq.rst
docs/gw/zeromq.rst
+5
-5
docs/install.rst
docs/install.rst
+6
-9
未找到文件。
docs/aoa/amps.rst
浏览文件 @
f568daa3
...
...
@@ -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 it
s 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 define
d
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
i
s the result:
Here
'
s the result:
.. image:: ../_static/amps.png
...
...
docs/aoa/gpu.rst
浏览文件 @
f568daa3
...
...
@@ -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 thres
olds
limits in the configuration file:
You can change the thres
hold
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
docs/aoa/header.rst
浏览文件 @
f568daa3
...
...
@@ -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**:
...
...
docs/aoa/irq.rst
浏览文件 @
f568daa3
...
...
@@ -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 information
s
:
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
docs/aoa/monitor.rst
浏览文件 @
f568daa3
...
...
@@ -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
.
docs/aoa/ports.rst
浏览文件 @
f568daa3
...
...
@@ -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
...
...
docs/aoa/ps.rst
浏览文件 @
f568daa3
...
...
@@ -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
-------------
...
...
docs/aoa/sensors.rst
浏览文件 @
f568daa3
...
...
@@ -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.
...
...
docs/aoa/wifi.rst
浏览文件 @
f568daa3
.. _wifi:
Wi
f
i
Wi
-F
i
=====
*Availability: Linux*
.. image:: ../_static/wifi.png
Glances displays the Wi
fi 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.
docs/cmds.rst
浏览文件 @
f568daa3
...
...
@@ -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
...
...
docs/config.rst
浏览文件 @
f568daa3
...
...
@@ -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
...
...
docs/gw/cassandra.rst
浏览文件 @
f568daa3
...
...
@@ -3,7 +3,7 @@
Cassandra
=========
You can export statistics to a
n
``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.
docs/gw/couchdb.rst
浏览文件 @
f568daa3
...
...
@@ -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
.
docs/gw/elastic.rst
浏览文件 @
f568daa3
...
...
@@ -3,7 +3,7 @@
Elasticsearch
=============
You can export statistics to an ``
e
lasticsearch`` server. The connection
You can export statistics to an ``
E
lasticsearch`` server. The connection
should be defined in the Glances configuration file as following:
.. code-block:: ini
...
...
docs/gw/influxdb.rst
浏览文件 @
f568daa3
...
...
@@ -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 column
s, 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
-------
...
...
docs/gw/zeromq.rst
浏览文件 @
f568daa3
...
...
@@ -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:
...
...
docs/install.rst
浏览文件 @
f568daa3
...
...
@@ -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, export
s modules, sensor
s...):
features (like the Web interface, export
module
s...):
.. 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 latest
s
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 addition
n
al 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录