提交 adb900d4 编写于 作者: N nicolargo

Merge branch 'develop'

......@@ -3,12 +3,13 @@ python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "pypy"
install:
- pip install -r requirements.txt
- pip install coveralls
script:
script:
- python setup.py install
- coverage run --source=glances unitest.py
after_success:
- coveralls
\ No newline at end of file
- coveralls
......@@ -8,7 +8,7 @@ https://twitter.com/nicolargo
https://github.com/nicolargo
nicolashennion@gmail.com
PGP Fingerprint: 835F C447 3BCD 60E9 9200 2778 ABA4 D1AB 9731 6A3C
PGP Public key: gpg --keyserver pgp.mit.edu --recv-keys 0xaba4d1ab97316a3c
PGP Public key: gpg --keyserver pgp.mit.edu --recv-keys 0xaba4d1ab97316a3c
Alessio Sergi (aka) Al3hex
https://twitter.com/al3hex
......@@ -37,8 +37,8 @@ https://github.com/notFloran
Packagers
=========
Rémi Verchère for the Debian package
https://github.com/rverchere/debian-glances
Daniel Echeverry and Sebastien Badia for the Debian package
https://mentors.debian.net/package/glances
Philip Lacroix for the Slackware (SlackBuild) package
......
......@@ -122,7 +122,9 @@ included in the project:
git checkout -b <topic-branch-name>
```
4. Commit your changes in logical chunks. Please adhere to these [git commit
4. It's coding time !
Please respect the following coding convention: [Elements of Python Style](https://github.com/amontalenti/elements-of-python-style)
Commit your changes in logical chunks. Please adhere to these [git commit
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your code is unlikely be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
......
#
# Glances Dockerfile
#
# https://github.com/nicolargo/glances
#
# Pull base image.
FROM ubuntu
# Install Glances (develop branch)
RUN apt-get -y install curl && \
curl -L https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install-develop.sh | /bin/bash
# Define working directory.
WORKDIR /glances
# EXPOSE PORT (For XMLRPC)
EXPOSE 61209
# EXPOSE PORT (For Web UI)
EXPOSE 61208
# Define default command.
CMD python -m glances $GLANCES_OPT
......@@ -3,17 +3,6 @@ include COPYING
include NEWS
include README.rst
include conf/glances.conf
include glances/outputs/static/html/*.html
include glances/outputs/static/html/plugins/*.html
include glances/outputs/static/*.ico
include glances/outputs/static/css/*.css
include glances/outputs/static/js/*.js
include glances/outputs/static/js/*.js.map
include glances/outputs/static/js/services/core/*.js
include glances/outputs/static/js/services/plugins/*.js
include glances/outputs/static/js/vendors/*.js
include glances/outputs/static/js/vendors/*.js.map
include glances/outputs/static/images/*.png
include man/glances.1
recursive-include docs images/*.png glances-doc.html
recursive-include docs *
recursive-include glances *.py
recursive-include glances/outputs/static *
......@@ -2,6 +2,61 @@
Glances Version 2
==============================================================================
Version 2.6
===========
Deprecations:
* Add deprecation warning for Python 2.6.
Python 2.6 support will be dropped in future releases.
Please switch to at least Python 2.7 or 3.3+ as soon as possible.
See http://www.snarky.ca/stop-using-python-2-6 for more information.
Enhancements and new features:
* Add a connector to ElasticSearch (welcome to Kibana dashboard) (issue #311)
* New folders' monitoring plugins (issue #721)
* Use wildcard (regexp) to the hide configuration option for network, diskio and fs sections (issue #799 )
* Command line arguments are now take into account in the WebUI (#789 by @notFloran)
* Change username for server and web server authentication (issue #693)
* Add an option to disable top menu (issue #766)
* Add IOps in the DiskIO plugin (issue #763)
* Add hide configuration key for FS Plugin (issue #736)
* Add process summary min/max stats (issue #703)
* Add timestamp to the CSV export module (issue #708)
* Add a shortcut 'E' to delete process filter (issue #699)
* By default, hide disk I/O ram1-** (issue #714)
* When Glances is starting the notifications should be delayed (issue #732)
* Add option (--disable-bg) to disable ANSI background colours (issue #738 by okdana)
* [WebUI] add "pointer" cursor for sortable columns (issue #704 by @notFloran)
* [WebUI] Make web page title configurable (issue #724)
* Do not show interface in down state (issue #765)
* InfluxDB > 0.9.3 needs float and not int for numerical value (issue#749 and issue#750 by nicolargo)
Bugs corrected:
* Can't read sensors on a Thinkpad (issue #711)
* InfluxDB/OpenTSDB: tag parsing broken (issue #713)
* Grafana Dashboard outdated for InfluxDB 0.9.x (issue #648)
* '--tree' breaks process filter on Debian 8 (issue #768)
* Fix highlighting of process when it contains whitespaces (issue #546 by Alessio Sergi)
* Fix RAID support in Python 3 (issue #793 by Alessio Sergi)
* Use dict view objects to avoid issue (issue #758 by Alessio Sergi)
* System exit if Cpu not supported by the Cpuinfo lib (issue #754 by nicolargo)
* KeyError: 'cpucore' when exporting data to InfluxDB (issue #729) by nicolargo)
Others:
* A new Glances docker container to monitor your Docker infrastructure is available here (issue #728): https://hub.docker.com/r/nicolargo/glances/
* Documentation is now generated automatically thanks to Sphinx and the Alessio Sergi patch (http://glances.readthedocs.org/en/latest/)
Contributors summary:
* Nicolas Hennion: 112 commits
* Alessio Sergi: 55 commits
* Floran Brutel: 19 commits
* Nicolas Hart: 8 commits
* @desbma: 4 commits
* @dana: 2 commits
* Damien Martin, Raju Kadam, @georgewhewell: 1 commit
Version 2.5.1
=============
......
......@@ -3,6 +3,8 @@ Glances - An eye on your system
===============================
.. image:: https://img.shields.io/pypi/v/glances.svg
:target: https://pypi.python.org/pypi/Glances
.. image:: https://img.shields.io/pypi/dm/glances.svg
:target: https://pypi.python.org/pypi/glances#downloads
:alt: Downloads this month
......@@ -10,13 +12,13 @@ Glances - An eye on your system
:target: https://github.com/nicolargo/glances/
:alt: Github stars
.. image:: https://travis-ci.org/nicolargo/glances.svg?branch=master
:target: https://travis-ci.org/nicolargo/glances
.. image:: https://img.shields.io/pypi/v/glances.svg
:target: https://pypi.python.org/pypi/Glances
:target: https://travis-ci.org/nicolargo/glances
.. image:: https://circleci.com/gh/nicolargo/glances/tree/develop.svg?style=svg
:target: https://circleci.com/gh/nicolargo/glances/tree/develop
.. image:: https://img.shields.io/scrutinizer/g/nicolargo/glances.svg
:target: https://scrutinizer-ci.com/g/nicolargo/glances/
:target: https://scrutinizer-ci.com/g/nicolargo/glances/
.. image:: https://api.flattr.com/button/flattr-badge-large.png
:target: https://flattr.com/thing/484466/nicolargoglances-on-GitHub
:target: https://flattr.com/thing/484466/nicolargoglances-on-GitHub
Follow Glances on Twitter: `@nicolargo`_ or `@glances_system`_
......@@ -28,7 +30,7 @@ written in Python.
Requirements
============
- ``python >= 2.6`` or ``>= 3.3`` (tested with version 2.6, 2.7, 3.3, 3.4)
- ``python >= 2.6`` or ``>= 3.3`` (tested with version 2.6, 2.7, 3.3, 3.4, 3.5)
- ``psutil >= 2.0.0``
- ``setuptools``
......@@ -49,12 +51,15 @@ Optional dependencies:
- ``matplotlib`` (for graphical/chart support)
- ``pika`` (for the RabbitMQ/ActiveMQ export module)
- ``py-cpuinfo`` (for the Quicklook CPU info module)
- ``scandir`` (for the Folders plugin) [Only for Python < 3.5]
Installation
============
Glances Auto Install script
---------------------------
Several method to test/install Glances on your system. Choose your weapon !
Glances Auto Install script: the total way
------------------------------------------
To install both dependencies and latest Glances production ready version
(aka *master* branch), just enter the following command line:
......@@ -93,7 +98,7 @@ features (like the Web interface):
.. code-block:: console
pip install bottle batinfo https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz zeroconf netifaces pymdstat influxdb potsdb statsd pystache docker-py pysnmp pika py-cpuinfo
pip install bottle batinfo https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz zeroconf netifaces pymdstat influxdb potsdb statsd pystache docker-py pysnmp pika py-cpuinfo scandir
Install or upgrade Glances from the Git ``develop`` repository:
......@@ -115,6 +120,24 @@ If you need to install Glances in a specific user location, use:
export PYTHONUSERBASE=~/mylocalpath
pip install --user glances
Docker: the funny way
---------------------
A Glances container is available. It will include the latest development HEAD version. You can use it to monitor your server and all your others containers !
Get the Glances container:
.. code-block:: console
docker pull nicolargo/glances
Run the container in console mode:
.. code-block:: console
docker run -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it docker.io/nicolargo/glances
GNU/Linux
---------
......@@ -190,6 +213,11 @@ To install Glances from source:
*Note*: Python headers are required to install psutil. For example,
on Debian/Ubuntu you need to install first the *python-dev* package.
Chef
----
An awesome ``Chef`` cookbook is available to monitor your infrastructure: https://supermarket.chef.io/cookbooks/glances (thanks to Antoine Rouyer)
Puppet
------
......@@ -238,7 +266,7 @@ and RTFM, always.
Documentation
=============
For complete documentation see `glances-doc`_.
For complete documentation have a look at the readthedocs_ website.
If you have any question (after RTFM!), please post it on the official Q&A `forum`_.
......@@ -273,6 +301,6 @@ LGPL. See ``COPYING`` for more details.
.. _@nicolargo: https://twitter.com/nicolargo
.. _@glances_system: https://twitter.com/glances_system
.. _Python: https://www.python.org/getit/
.. _glances-doc: https://github.com/nicolargo/glances/blob/master/docs/glances-doc.rst
.. _readthedocs: https://glances.readthedocs.org/
.. _forum: https://groups.google.com/forum/?hl=en#!forum/glances-users
.. _wiki: https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-%3F
此差异已折叠。
[quicklook]
# Define CPU, MEM and SWAP thresholds in %
cpu_careful=50
cpu_warning=70
cpu_critical=90
......@@ -10,12 +11,13 @@ swap_warning=70
swap_critical=90
[cpu]
# Define CPU thresholds in %
# Default values if not defined: 50/70/90
user_careful=50
user_warning=70
user_critical=90
#user_log=False
#user_critical_action=echo {{user}} {{value}} {{max}} > /tmp/cpu.alert
#user_critical_action=echo `date` - {{user}} > /tmp/cpu.alert
iowait_careful=50
iowait_warning=70
iowait_critical=90
......@@ -28,6 +30,7 @@ steal_critical=90
#steal_log=True
[percpu]
# Define CPU thresholds in %
# Default values if not defined: 50/70/90
user_careful=50
user_warning=70
......@@ -40,6 +43,7 @@ system_warning=70
system_critical=90
[load]
# Define LOAD thresholds
# Value * number of cores
# Default values if not defined: 0.7/1.0/5.0 per number of cores
# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
......@@ -50,22 +54,22 @@ critical=5.0
#log=False
[mem]
# Default limits for free RAM memory in %
# Define RAM thresholds in %
# Default values if not defined: 50/70/90
careful=50
warning=70
critical=90
[memswap]
# Default limits for free swap memory in %
# Define SWAP thresholds in %
# Default values if not defined: 50/70/90
careful=50
warning=70
critical=90
#[network]
# Define the list of hidden network interfaces (comma separeted)
#hide=lo
# Define the list of hidden network interfaces (comma-separated regexp)
#hide=docker.*,lo
# WLAN 0 alias
#wlan0_alias=Wireless IF
# WLAN 0 Default limits (in bits per second aka bps) for interface bitrate
......@@ -79,34 +83,53 @@ critical=90
#wlan0_tx_log=True
#[diskio]
# Define the list of hidden disks (comma separeted)
#hide=sda2,sda5
# Define the list of hidden disks (comma-separated regexp)
#hide=sda2,sda5,loop.*
# Alias for sda1
#sda1_alias=IntDisk
[fs]
# Default limits for free filesytem space in %
# Define the list of hidden file system (comma-separated regexp)
#hide=/boot.*
# Define filesystem space thresholds in %
# Default values if not defined: 50/70/90
# It is also possible to define per mount point value
# Example: /_careful=40
careful=50
warning=70
critical=90
# Allow additionnals files types (comma-separated FS type)
# Allow additional file system types (comma-separated FS type)
#allow=zfs
#[folders]
# Define a folder list to monitor
# The list is composed of items (list_#nb <= 10)
# An item is defined by:
# * path: absolute path
# * careful: optional careful threshold (in MB)
# * warning: optional warning threshold (in MB)
# * critical: optional critical threshold (in MB)
#folder_1_path=/tmp
#folder_1_careful=2500
#folder_1_warning=3000
#folder_1_critical=3500
#folder_2_path=/home/nicolargo/Videos
#folder_2_warning=17000
#folder_2_critical=20000
#folder_3_path=/nonexisting
[sensors]
# Sensors core limits (in Celsius...)
# Sensors core thresholds (in Celsius...)
# Default values if not defined: 60/70/80
temperature_core_careful=60
temperature_core_warning=70
temperature_core_critical=80
# Temperatures in °C for hddtemp
# Temperatures threshold in °C for hddtemp
# Default values if not defined: 45/52/60
temperature_hdd_careful=45
temperature_hdd_warning=52
temperature_hdd_critical=60
# Battery % limits
# Battery threshold in %
battery_careful=80
battery_warning=90
battery_critical=95
......@@ -117,7 +140,7 @@ battery_critical=95
#core 1_alias=CPU Core 1
[processlist]
# Limit values for CPU/MEM per process in %
# Define CPU/MEM (per process) thresholds in %
# Default values if not defined: 50/70/90
cpu_careful=50
cpu_warning=70
......@@ -165,18 +188,18 @@ mem_critical=90
#server_4_name=pasbon
#server_4_port=61237
[passwords]
#[passwords]
# Define the passwords list
# Syntax: host=password
# Where: host is the hostname
# password is the clear password
# Additionnaly (and optionnaly) a default password could be defined
# Additionally (and optionally) a default password could be defined
#xps=abc
#default=defaultpassword
[influxdb]
# Configuration file for the --export-influxdb option
# https://influxdb.com/
# https://influxdb.com/
host=localhost
port=8086
user=root
......@@ -200,6 +223,14 @@ host=localhost
port=8125
#prefix=glances
[elasticsearch]
# Configuration file for the --export-elasticsearch option
# Data are available via the ES Restful API. ex: URL/<index>/cpu/system
# https://www.elastic.co
host=localhost
port=9200
index=glances
[rabbitmq]
host=localhost
port=5672
......
......@@ -7,6 +7,11 @@ SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
......@@ -14,8 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
......@@ -25,53 +29,66 @@ help:
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
.PHONY: clean
clean:
-rm -rf $(BUILDDIR)/*
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
......@@ -81,6 +98,16 @@ qthelp:
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Glances.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
......@@ -90,11 +117,13 @@ devhelp:
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Glances"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
......@@ -102,22 +131,36 @@ latex:
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
rm -f man/*
cp $(BUILDDIR)/man/* man/
@echo "The manual pages have been copied in ./man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
......@@ -125,29 +168,52 @@ texinfo:
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
Building the docs
=================
First install Sphinx:
pip install sphinx
or update it if already installed:
pip install --upgrade sphinx
Go to the docs folder:
cd docs
Then build the HTML documentation:
make html
and the man page:
LC_ALL=C make man
<h3>Useful Links</h3>
<ul>
<li><a href="https://pypi.python.org/pypi/Glances">Glances @ PyPI</a></li>
<li><a href="https://github.com/nicolargo/glances">Glances @ GitHub</a></li>
<li><a href="https://github.com/nicolargo/glances/issues">Issue Tracker</a></li>
<li><a href="https://groups.google.com/forum/#!forum/glances-users">Forum</a></li>
</ul>
.. _actions:
Actions
=======
Glances can trigger actions on events.
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:
.. code-block:: ini
[load]
critical=5.0
critical_action=python /path/to/foo.py
All the stats are available in the command line through the use of the
`{{mustache}}`_ syntax. Another example would be to create a log file
containing used vs total disk space if a space trigger warning is
reached:
.. code-block:: ini
[fs]
warning=70
warning_action=echo {{mnt_point}} {{used}}/{{size}} > /tmp/fs.alert
.. note::
You can use all the stats for the current plugin. See
https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to
for the stats list.
.. _{{mustache}}: https://mustache.github.io/
.. _cpu:
CPU
===
The CPU stats are shown as a percentage and for the configured refresh
time. The total CPU usage is displayed on the first line.
.. image:: ../_static/cpu.png
If enough horizontal space is available, extended CPU information are
displayed.
.. image:: ../_static/cpu-wide.png
To switch to per-CPU stats, just hit the ``1`` key:
.. image:: ../_static/per-cpu.png
By default, ``steal`` CPU time alerts aren't logged. If you want that,
just add to the configuration file:
.. code-block:: ini
[cpu]
steal_log=True
Legend:
================= ============
CPU (user/system) Status
================= ============
``<50%`` ``OK``
``>50%`` ``CAREFUL``
``>70%`` ``WARNING``
``>90%`` ``CRITICAL``
================= ============
.. note::
Limit values can be overwritten in the configuration file under
the ``[cpu]`` and/or ``[percpu]`` sections.
.. _disk:
Disk I/O
========
.. image:: ../_static/diskio.png
Glances displays the disk I/O throughput. The unit is adapted
dynamically.
There is no alert on this information.
It's possible to define:
- a list of disks to hide
- aliases for disk name
under the ``[diskio]`` section in the configuration file.
For example, if you want to hide the loopback disks (loop0, loop1, ...)
and the specific ``sda5`` partition:
.. code-block:: ini
[diskio]
hide=sda5,loop.*
.. _docker:
Docker
======
If you use ``Docker``, Glances can help you to monitor your containers.
Glances uses the Docker API through the `docker-py`_ library.
.. image:: ../_static/docker.png
.. _docker-py: https://github.com/docker/docker-py
.. _folders:
Folders
=======
The folders plugin allows user, through the configuration file, to
monitor size of a predefined folders list.
.. image:: ../_static/folders.png
Each item is defined by:
- ``path``: absolute path to monitor (mandatory)
- ``careful``: optional careful threshold (in MB)
- ``warning``: optional warning threshold (in MB)
- ``critical``: optional critical threshold (in MB)
Up to ``10`` items can be defined.
For example, if you want to monitor the ``/tmp`` folder, the following
definition should do the job:
.. code-block:: ini
[folders]
folder_1_path=/tmp
folder_1_careful=2500
folder_1_warning=3000
folder_1_critical=3500
In client/server mode, the list is defined on the ``server`` side.
.. warning::
Do **NOT** define folders containing lot of files and subfolders.
.. _fs:
File System
===========
.. image:: ../_static/fs.png
Glances displays the used and total file system disk space. The unit is
adapted dynamically.
Alerts are set for used disk space.
Legend:
=========== ============
Disk usage Status
=========== ============
``<50%`` ``OK``
``>50%`` ``CAREFUL``
``>70%`` ``WARNING``
``>90%`` ``CRITICAL``
=========== ============
.. note::
Limit values can be overwritten in the configuration file under
the ``[filesystem]`` section.
By default, the plugin only displays physical devices (hard disks, USB
keys). To allow other file system types, you have to enable them in the
configuration file. For example, if you want to allow the ``zfs`` file
system:
.. code-block:: ini
[fs]
allow=zfs
Also, you can hide mount points as well (in the following ``/boot``):
.. code-block:: ini
[fs]
hide=/boot.*
RAID
----
*Availability: Linux*
Thanks to the `pymdstat`_ library, if a ``RAID`` controller is detected
on you system, its status will be displayed as well:
.. image:: ../_static/raid.png
.. _pymdstat: https://github.com/nicolargo/pymdstat
.. _header:
Header
======
.. image:: ../_static/header.png
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.
In client mode, the server connection status is also displayed.
**Connected**:
.. image:: ../_static/connected.png
**Disconnected**:
.. image:: ../_static/disconnected.png
.. _aoa:
Anatomy Of The Application
==========================
This document is meant to give an overview of the Glances interface.
Legend:
=========== ============
``GREEN`` ``OK``
``BLUE`` ``CAREFUL``
``MAGENTA`` ``WARNING``
``RED`` ``CRITICAL``
=========== ============
.. note::
Only stats with colored background will be shown in the alert view.
.. toctree::
:maxdepth: 2
header
quicklook
cpu
load
memory
network
disk
fs
folders
sensors
ps
monitor
logs
docker
actions
.. _load:
Load
====
*Availability: Unix*
.. image:: ../_static/load.png
On the *No Sheep* blog, Zachary Tirrell defines the `load average`_:
"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."
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.
Legend:
============= ============
Load avg Status
============= ============
``<0.7*core`` ``OK``
``>0.7*core`` ``CAREFUL``
``>1*core`` ``WARNING``
``>5*core`` ``CRITICAL``
============= ============
.. note::
Limit values can be overwritten in the configuration file under
the ``[load]`` section.
.. _load average: http://nosheep.net/story/defining-unix-load-average/
.. _logs:
Logs
====
.. image:: ../_static/logs.png
A log messages list is displayed in the bottom of the screen if and only
if:
- at least one ``WARNING`` or ``CRITICAL`` alert was occurred
- space is available in the bottom of the console/terminal
Each alert message displays the following information:
1. start datetime
2. duration if alert is terminated or `ongoing` if the alert is still in
progress
3. alert name
4. {min,avg,max} values or number of running processes for monitored
processes list alerts
.. _memory:
Memory
======
Glances uses two columns: one for the ``RAM`` and one for the ``SWAP``.
.. image:: ../_static/mem.png
If enough space is available, Glances displays extended information for
the ``RAM``:
.. image:: ../_static/mem-wide.png
Alerts are only set for used memory and used swap.
Legend:
======== ============
RAM/Swap Status
======== ============
``<50%`` ``OK``
``>50%`` ``CAREFUL``
``>70%`` ``WARNING``
``>90%`` ``CRITICAL``
======== ============
.. note::
Limit values can be overwritten in the configuration file under
the ``[memory]`` and/or ``[memswap]`` sections.
.. _monitor:
Monitored Processes List
========================
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.
.. image:: ../_static/monitored.png
Each item is defined by:
- ``description``: description of the processes (max 16 chars).
- ``regex``: regular expression of the processes to monitor.
- ``command``: (optional) full path to shell command/script for extended
- stat. Should return a single line string. Use with caution.
- ``countmin``: (optional) minimal number of processes. A warning will
- be displayed if number of processes < count.
- ``countmax``: (optional) maximum number of processes. A warning will
be displayed if number of processes > count.
Up to ``10`` items can be defined.
For example, if you want to monitor the Nginx processes on a web server,
the following definition should do the job:
.. code-block:: ini
[monitor]
list_1_description=Nginx server
list_1_regex=.*nginx.*
list_1_command=nginx -v
list_1_countmin=1
list_1_countmax=4
If you also want to monitor the PHP-FPM daemon processes, you should add
another item:
.. code-block:: ini
[monitor]
list_1_description=Nginx server
list_1_regex=.*nginx.*
list_1_command=nginx -v
list_1_countmin=1
list_1_countmax=4
list_2_description=PHP-FPM
list_2_regex=.*php-fpm.*
list_2_countmin=1
list_2_countmax=20
In client/server mode, the list is defined on the server side.
A new method, called `getAllMonitored`, is available in the APIs and
get the JSON representation of the monitored processes list.
Alerts are set as following:
================= ============
# of process Status
================= ============
``0`` ``CRITICAL``
``min < p < max`` ``OK``
``p > max`` ``WARNING``
================= ============
.. _network:
Network
=======
.. image:: ../_static/network.png
Glances displays the network interface bit rate. The unit is adapted
dynamically (bit/s, kbit/s, Mbit/s, etc).
Alerts are only set if the maximum speed per network interface is
available (see sample in the configuration file).
It's also possibile to define:
- a list of network interfaces to hide
- per-interface limit values
- aliases for interface name
in the ``[network]`` section of the configuration file.
For example, if you want to hide the loopback interface (lo) and all the
virtual docker interface (docker0, docker1, ...):
.. code-block:: ini
[network]
hide=lo,docker.*
.. _ps:
Processes List
==============
Compact view:
.. image:: ../_static/processlist.png
Full view:
.. image:: ../_static/processlist-wide.png
Filtered view:
.. image:: ../_static/processlist-filter.png
The process view consists of 3 parts:
- Processes summary
- Monitored processes list (optional)
- Processes list
The processes summary line displays:
- Tasks number (total number of processes)
- Threads number
- Running tasks number
- Sleeping tasks number
- Other tasks number (not running or sleeping)
- Sort key
By default, or if you hit the ``a`` key, the processes list is
automatically sorted by:
- ``CPU``: if there is no alert (default behavior)
- ``CPU``: if a CPU or LOAD alert is detected
- ``MEM``: if a memory alert is detected
- ``DISK I/O``: if a CPU iowait alert is detected
The number of processes in the list is adapted to the screen size.
Columns display
---------------
========================= ==============================================
``CPU%`` % of CPU used by the process
If Irix/Solaris mode is off, the value is
divided by logical core number
``MEM%`` % of MEM used by the process
``VIRT`` Virtual Memory Size
The total amount of virtual memory used by the
process
``RES`` Resident Memory Size
The non-swapped physical memory a process is
using
``PID`` Process ID
``USER`` User ID
``NI`` Nice level of the process
``S`` Process status
The status of the process:
- ``R``: running
- ``S``: sleeping (may be interrupted)
- ``D``: disk sleep (may not be interrupted)
- ``T``: traced/stopped
- ``Z``: zombie
``TIME+`` Cumulative CPU time used by the process
``R/s`` Per process I/O read rate in B/s
``W/s`` Per process I/O write rate in B/s
``COMMAND`` Process command line or command name
User can switch to the process name by
pressing on the ``'/'`` key
========================= ==============================================
Extended info
-------------
.. image:: ../_static/processlist-top.png
In standalone mode, additional information are provided for the top
process:
========================= ==============================================
``CPU affinity`` Number of cores used by the process
``Memory info`` Extended memory information about the process
For example, on Linux: swap, shared, text,
lib, data and dirty
``Open`` The number of threads, files and network
sessions (TCP and UDP) used by the process
``IO nice`` The process I/O niceness (priority)
========================= ==============================================
The extended stats feature can be enabled using the
``--enable-process-extended`` option (command line) or the ``e`` key
(curses interface).
.. note::
Limit values can be overwritten in the configuration file under
the ``[process]`` section.
.. _quicklook:
Quick Look
==========
The ``quicklook`` plugin is only displayed on wide screen and proposes a
bar view for CPU and memory (virtual and swap).
.. image:: ../_static/quicklook.png
If the per CPU mode is on (by clicking the ``1`` key):
.. image:: ../_static/quicklook-percpu.png
.. note::
Limit values can be overwritten in the configuration file under
the ``[quicklook]`` section.
.. _sensors:
Sensors
=======
*Availability: Linux*
.. image:: ../_static/sensors.png
Glances can displays the sensors information using ``lm-sensors``,
``hddtemp`` and `batinfo`_.
All of the above libraries are available only on Linux.
As of ``lm-sensors``, a filter is being applied in order to display
temperature and fan speed only.
There is no alert on this information.
.. note::
Limit values and sensors alias names can be defined in the
configuration file under the ``[sensors]`` section.
.. _batinfo: https://github.com/nicolargo/batinfo
.. _api:
API Documentation
=================
Glances provides an `XML-RPC server`_ and a `RESTful-JSON`_ API which
can be used by other clients.
API documentation is available at:
- XML-RPC: https://github.com/nicolargo/glances/wiki/The-Glances-2.x-API-How-to
- RESTful-JSON: https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API
.. _XML-RPC server: http://docs.python.org/2/library/simplexmlrpcserver.html
.. _RESTful-JSON: http://jsonapi.org/
.. _cmds:
Command Reference
=================
Command-Line Options
--------------------
.. option:: -h, --help
show this help message and exit
.. option:: -V, --version
show program's version number and exit
.. option:: -d, --debug
enable debug mode
.. option:: -C CONF_FILE, --config CONF_FILE
path to the configuration file
.. option:: -3, --disable-quicklook
disable quick look module
.. option:: -4, --full-quicklook
disable all but quick look and load
.. option:: --disable-cpu
disable CPU module
.. option:: --disable-mem
disable memory module
.. option:: --disable-swap
disable swap module
.. option:: --disable-load
disable load module
.. option:: --disable-network
disable network module
.. option:: --disable-ip
disable IP module
.. option:: --disable-diskio
disable disk I/O module
.. option:: --disable-fs
disable filesystem module
.. option:: --disable-folder
disable folder module
.. option:: --disable-sensors
disable sensors module
.. option:: --disable-hddtemp
disable HD temperature module
.. option:: --disable-raid
disable RAID module
.. option:: --disable-docker
disable Docker module
.. option:: -5, --disable-top
disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
.. option:: -2, --disable-left-sidebar
disable network, disk I/O, FS and sensors modules (py3sensors lib
needed)
.. option:: --disable-process
disable process module
.. option:: --disable-log
disable log module
.. option:: --disable-bold
disable bold mode in the terminal
.. option:: --disable-bg
disable background colors in the terminal
.. option:: --enable-process-extended
enable extended stats on top process
.. option:: --enable-history
enable the history mode (matplotlib lib needed)
.. option:: --path-history PATH_HISTORY
set the export path for graph history
.. option:: --export-csv EXPORT_CSV
export stats to a CSV file
.. option:: --export-influxdb
export stats to an InfluxDB server (influxdb lib needed)
.. option:: --export-opentsdb
export stats to an OpenTSDB server (potsdb lib needed)
.. option:: --export-statsd
export stats to a StatsD server (statsd lib needed)
.. option:: --export-rabbitmq
export stats to RabbitMQ broker (pika lib needed)
.. option:: --export-elasticsearch
export stats to an Elasticsearch server (elasticsearch lib needed)
.. option:: -c CLIENT, --client CLIENT
connect to a Glances server by IPv4/IPv6 address or hostname
.. option:: -s, --server
run Glances in server mode
.. option:: --browser
start the client browser (list of servers)
.. option:: --disable-autodiscover
disable autodiscover feature
.. option:: -p PORT, --port PORT
define the client/server TCP port [default: 61209]
.. option:: -B BIND_ADDRESS, --bind BIND_ADDRESS
bind server to the given IPv4/IPv6 address or hostname
.. option:: --username
define a client/server username
.. option:: --password
define a client/server password
.. option:: --snmp-community SNMP_COMMUNITY
SNMP community
.. option:: --snmp-port SNMP_PORT
SNMP port
.. option:: --snmp-version SNMP_VERSION
SNMP version (1, 2c or 3)
.. option:: --snmp-user SNMP_USER
SNMP username (only for SNMPv3)
.. option:: --snmp-auth SNMP_AUTH
SNMP authentication key (only for SNMPv3)
.. option:: --snmp-force
force SNMP mode
.. option:: -t TIME, --time TIME
set refresh time in seconds [default: 3 sec]
.. option:: -w, --webserver
run Glances in web server mode (bottle lib needed)
.. option:: -q, --quiet
do not display the curses interface
.. option:: -f PROCESS_FILTER, --process-filter PROCESS_FILTER
set the process filter pattern (regular expression)
.. option:: --process-short-name
force short name for processes name
.. option:: -0, --disable-irix
task's CPU usage will be divided by the total number of CPUs
.. option:: --hide-kernel-threads
hide kernel threads in process list
.. option:: --tree
display processes as a tree
.. option:: -b, --byte
display network rate in byte per second
.. option:: --diskio-show-ramfs
show RAM FS in the DiskIO plugin
.. option:: --diskio-iops
show I/O per second in the DiskIO plugin
.. option:: --fahrenheit
display temperature in Fahrenheit (default is Celsius)
.. option:: -1, --percpu
start Glances in per CPU mode
.. option:: --fs-free-space
display FS free space instead of used
.. option:: --theme-white
optimize display colors for white background
Interactive Commands
--------------------
The following commands (key pressed) are supported while in Glances:
``ENTER``
Set the process filter
**Note**: on OS X, please use ``CTRL-H`` to delete
filter.
Filter is a regular expression pattern:
- ``gnome``: matches all processes starting with the ``gnome``
string
- ``.*gnome.*``: matches all processes containing the ``gnome``
string
``a``
Sort process list automatically
- If CPU ``>70%``, sort processes by CPU usage
- If MEM ``>70%``, sort processes by MEM usage
- If CPU iowait ``>60%``, sort processes by I/O read and write
``b``
Switch between bit/s or Byte/s for network I/O
``B``
View disk I/O counters per second
``c``
Sort processes by CPU usage
``d``
Show/hide disk I/O stats
``D``
Enable/disable Docker stats
``e``
Enable/disable top extended stats
``E``
Erase current process filter
``f``
Show/hide file system and folder monitoring stats
``F``
Switch between file system used and free space
``g``
Generate graphs for current history
``h``
Show/hide the help screen
``i``
Sort processes by I/O rate
``I``
Show/hide IP module
``l``
Show/hide log messages
``m``
Sort processes by MEM usage
``M``
Reset processes summary min/max
``n``
Show/hide network stats
``p``
Sort processes by name
``q|ESC``
Quit the current Glances session
``r``
Reset history
``R``
Show/hide RAID plugin
``s``
Show/hide sensors stats
``t``
Sort process by CPU times (TIME+)
``T``
View network I/O as combination
``u``
Sort processes by USER
``U``
View cumulative network I/O
``w``
Delete finished warning log messages
``x``
Delete finished warning and critical log messages
``z``
Show/hide processes stats
``0``
Enable/disable Irix/Solaris mode
Task's CPU usage will be divided by the total number of CPUs
``1``
Switch between global CPU and per-CPU stats
``2``
Enable/disable left sidebar
``3``
Enable/disable the quick look module
``4``
Enable/disable all but quick look and load module
``5``
Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
``/``
Switch between process command line or command name
In the Glances client browser (accessible through the ``--browser``
command line argument):
``ENTER``
Run the selected server
``UP``
Up in the servers list
``DOWN``
Down in the servers list
``q|ESC``
Quit Glances
# -*- coding: utf-8 -*-
#
# Glances documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 25 19:57:21 2014.
# sphinx-quickstart on Tue Mar 1 10:53:59 2016.
#
# This file is execfile()d with the current directory set to its containing dir.
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
......@@ -11,45 +12,36 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import datetime
import sys
import os
from datetime import datetime
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
cwd = os.path.realpath(os.path.dirname(__file__))
project_path = os.path.realpath(os.path.join(cwd, '..', 'glances'))
def get_version():
init_file = os.path.realpath(os.path.join(project_path, '__init__.py'))
f = open(init_file, 'r')
try:
for line in f:
if line.startswith('__version__'):
return line.strip().split(' = ')[1]
else:
raise ValueError("Version string not found")
finally:
f.close()
_version = get_version()
_year = datetime.datetime.now().year
_copyright = u'{0}, Nicolas Hennion'.format(_year)
# -- General configuration -----------------------------------------------------
# Insert Glances' path into the system.
sys.path.insert(0, os.path.abspath('..'))
from glances import __version__
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
......@@ -59,20 +51,25 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Glances'
copyright = _copyright
project = 'Glances'
author = 'Nicolas Hennion'
year = datetime.now().year
copyright = '%d, %s' % (year, author)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = _version
version = __version__
# The full version, including alpha/beta/rc tags.
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
#language = None
# There are two options for replacing |today|: either, you set today to some
......@@ -85,7 +82,8 @@ release = version
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
......@@ -105,17 +103,27 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ---------------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
'github_user': 'nicolargo',
'github_repo': 'glances',
'show_powered_by': False
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
......@@ -131,15 +139,20 @@ html_theme = 'default'
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
......@@ -150,7 +163,14 @@ html_theme = 'default'
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'links.html',
'searchbox.html'
]
}
# Additional templates that should be rendered to pages, maps page names to
# template names.
......@@ -166,7 +186,7 @@ html_theme = 'default'
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
......@@ -182,11 +202,24 @@ html_theme = 'default'
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Glancesdoc'
# -- Options for LaTeX output --------------------------------------------------
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
......@@ -197,13 +230,17 @@ latex_elements = {
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'Glances.tex', u'Glances Documentation',
u'Nicolas Hennion', 'manual'),
(master_doc, 'Glances.tex', 'Glances Documentation',
'Nicolas Hennion', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
......@@ -227,28 +264,28 @@ latex_documents = [
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'glances', u'Glances Documentation',
[u'Nicolas Hennion'], 1)
('glances', 'glances', 'An eye on your system',
'', 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Glances', u'Glances Documentation',
u'Nicolas Hennion', 'Glances', 'One line description of project.',
'Miscellaneous'),
(master_doc, 'Glances', 'Glances Documentation',
author, 'Glances', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
......@@ -259,3 +296,6 @@ texinfo_documents = [
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
.. _config:
Configuration
=============
No configuration file is mandatory to use Glances.
Furthermore a configuration file is needed to access more settings.
Location
--------
You can put the ``glances.conf`` file in the following locations:
=========== ============================================================
``Linux`` ~/.config/glances, /etc/glances
``*BSD`` ~/.config/glances, /usr/local/etc/glances
``OS X`` ~/Library/Application Support/glances, /usr/local/etc/glances
``Windows`` %APPDATA%\glances
=========== ============================================================
On Windows XP, the ``%APPDATA%`` path is:
::
C:\Documents and Settings\<User>\Application Data
Since Windows Vista and newer versions:
::
C:\Users\<User>\AppData\Roaming
User-specific options override system-wide options and options given on
the command line override either.
Syntax
------
Glances reads configuration files in the *ini* syntax.
Each plugin and export module can have a section. Below an example for
the CPU plugin:
.. code-block:: ini
[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
Logging
-------
Glances logs all of its internal messages to a log file.
``DEBUG`` messages can been logged using the ``-d`` option on the command
line.
By default, the ``glances.log`` file is under the temporary directory:
===================== ==================================================
``Linux, *BSD, OS X`` /tmp
``Windows`` %APPDATA%\\Local\\temp
===================== ==================================================
If ``glances.log`` is not writable, a new file will be created and
returned to the user console.
此差异已折叠。
此差异已折叠。
:orphan:
glances
=======
SYNOPSIS
--------
**glances** [OPTIONS]
DESCRIPTION
-----------
**glances** is a cross-platform curses-based 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. It can also work in client/server mode.
Remote monitoring could be done via terminal or web interface.
**glances** is written in Python and uses the *psutil* library to get
information from your system.
OPTIONS
-------
.. include:: cmds.rst
EXAMPLES
--------
Monitor local machine (standalone mode):
$ glances
Monitor local machine with the web interface (Web UI):
$ glances -w
Monitor local machine and export stats to a CSV file:
$ glances --export-csv
Monitor local machine and export stats to a InfluxDB server with 5s
refresh time:
$ glances -t 5 --export-influxdb
Start a Glances server (server mode):
$ glances -s
Connect Glances to a Glances server (client mode):
$ glances -c <ip_server>
Connect to a Glances server and export stats to a StatsD server:
$ glances -c <ip_server> --export-statsd
Start the client browser (browser mode):
$ glances --browser
AUTHOR
------
Nicolas Hennion aka Nicolargo <contact@nicolargo.com>
.. _csv:
CSV
===
It's possible to export stats to a CSV file.
.. code-block:: console
$ glances --export-csv /tmp/glances.csv
CSV file description:
- Stats description (first line)
- Stats (other lines)
此差异已折叠。
.. _gw:
Gateway To Other Services
=========================
Glances can exports stats to a CSV file. Also, it can act as a gateway
to providing stats to multiple services.
.. toctree::
:maxdepth: 2
csv
influxdb
opentsdb
statsd
rabbitmq
elastic
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册