• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.ci/appveyor/H10-Mar-2020-327271

.github/H10-Mar-2020-3117

conf/H10-Mar-2020-3,7923,423

docker-files/H10-Mar-2020-10677

docs/H03-May-2022-4,4313,192

glances/H03-May-2022-30,47122,646

snap/H10-Mar-2020-10892

.coveragercH A D10-Mar-2020555 3127

.gitattributesH A D10-Mar-202056 21

.gitignoreH A D10-Mar-2020589 6349

.mailmapH A D10-Mar-20201,006 1413

.travis.ymlH A D10-Mar-2020581 2726

AUTHORSH A D10-Mar-20201.7 KiB6143

CODE-OF-CONDUCT.mdH A D10-Mar-20203.2 KiB7455

CONTRIBUTING.mdH A D10-Mar-20205.5 KiB152109

COPYINGH A D10-Mar-20207.5 KiB167128

MANIFEST.inH A D10-Mar-2020217 109

MakefileH A D10-Mar-2020316 1711

NEWS.rstH A D10-Mar-202046.5 KiB1,200931

README.rstH A D10-Mar-202012.4 KiB443286

appveyor.ymlH A D10-Mar-20201.8 KiB7555

pylint.cfgH A D10-Mar-20207.4 KiB260172

setup.pyH A D03-May-20224 KiB138104

sonar-project.propertiesH A D10-Mar-2020585 2116

tox.iniH A D10-Mar-2020328 2118

uninstall.shH A D10-Mar-2020397 2314

unitest-all.shH A D10-Mar-202080 42

unitest-restful.pyH A D10-Mar-20208.4 KiB242180

unitest-xmlrpc.pyH A D10-Mar-20205.9 KiB206134

unitest.pyH A D10-Mar-202014.6 KiB388299

README.rst

1===============================
2Glances - An eye on your system
3===============================
4
5.. image:: https://img.shields.io/pypi/v/glances.svg
6    :target: https://pypi.python.org/pypi/Glances
7
8.. image:: https://img.shields.io/github/stars/nicolargo/glances.svg
9    :target: https://github.com/nicolargo/glances/
10    :alt: Github stars
11
12.. image:: https://pepy.tech/badge/glances/month
13    :target: https://pepy.tech/project/glances
14    :alt: Downloads
15
16.. image:: https://img.shields.io/travis/nicolargo/glances/master.svg?maxAge=3600&label=Linux%20/%20BSD%20/%20macOS
17    :target: https://travis-ci.org/nicolargo/glances
18    :alt: Linux tests (Travis)
19
20.. image:: https://img.shields.io/appveyor/ci/nicolargo/glances/master.svg?maxAge=3600&label=Windows
21    :target: https://ci.appveyor.com/project/nicolargo/glances
22    :alt: Windows tests (Appveyor)
23
24.. image:: https://scrutinizer-ci.com/g/nicolargo/glances/badges/quality-score.png?b=develop
25    :target: https://scrutinizer-ci.com/g/nicolargo/glances/?branch=develop
26
27.. image:: https://img.shields.io/badge/Donate-PayPal-green.svg
28    :target: https://www.paypal.me/nicolargo
29
30.. image:: https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40nicolargo
31    :target: https://twitter.com/nicolargo
32
33Summary
34=======
35
36**Glances** is a cross-platform monitoring tool which aims to present a
37large amount of monitoring information through a curses or Web
38based interface. The information dynamically adapts depending on the
39size of the user interface.
40
41.. image:: https://raw.githubusercontent.com/nicolargo/glances/develop/docs/_static/glances-summary.png
42
43It can also work in client/server mode. Remote monitoring could be done
44via terminal, Web interface or API (XML-RPC and RESTful). Stats can also
45be exported to files or external time/value databases.
46
47.. image:: https://raw.githubusercontent.com/nicolargo/glances/develop/docs/_static/glances-responsive-webdesign.png
48
49Glances is written in Python and uses libraries to grab information from
50your system. It is based on an open architecture where developers can
51add new plugins or exports modules.
52
53Requirements
54============
55
56- ``python 2.7,>=3.4``
57- ``psutil>=5.3.0`` (better with latest version)
58
59Optional dependencies:
60
61- ``bernhard`` (for the Riemann export module)
62- ``bottle`` (for Web server mode)
63- ``cassandra-driver`` (for the Cassandra export module)
64- ``couchdb`` (for the CouchDB export module)
65- ``docker`` (for the Docker monitoring support) [Linux/macOS-only]
66- ``elasticsearch`` (for the Elastic Search export module)
67- ``hddtemp`` (for HDD temperature monitoring support) [Linux-only]
68- ``influxdb`` (for the InfluxDB export module)
69- ``kafka-python`` (for the Kafka export module)
70- ``netifaces`` (for the IP plugin)
71- ``nvidia-ml-py3`` (for the GPU plugin)
72- ``pika`` (for the RabbitMQ/ActiveMQ export module)
73- ``potsdb`` (for the OpenTSDB export module)
74- ``prometheus_client`` (for the Prometheus export module)
75- ``py-cpuinfo`` (for the Quicklook CPU info module)
76- ``pygal`` (for the graph export module)
77- ``pymdstat`` (for RAID support) [Linux-only]
78- ``pySMART.smartx`` (for HDD Smart support) [Linux-only]
79- ``pysnmp`` (for SNMP support)
80- ``pystache`` (for the action script feature)
81- ``pyzmq`` (for the ZeroMQ export module)
82- ``requests`` (for the Ports, Cloud plugins and RESTful export module)
83- ``scandir`` (for the Folders plugin) [Only for Python < 3.5]
84- ``statsd`` (for the StatsD export module)
85- ``wifi`` (for the wifi plugin) [Linux-only]
86- ``zeroconf`` (for the autodiscover mode)
87
88*Note for Python 2.6 users*
89
90Glances no longer supports Python 2.6. Please upgrade
91to a minimum Python version of 2.7/3.4+ or downgrade to Glances 2.6.2 (last version
92with Python 2.6 support).
93
94*Note for CentOS Linux 6 and 7 users*
95
96Python 2.7 and 3.4 are now available via SCL repositories. See:
97https://lists.centos.org/pipermail/centos-announce/2015-December/021555.html.
98
99Installation
100============
101
102There are several methods to test/install Glances on your system. Choose your weapon!
103
104Glances Auto Install script: the total way
105------------------------------------------
106
107To install both dependencies and the latest Glances production ready version
108(aka *master* branch), just enter the following command line:
109
110.. code-block:: console
111
112    curl -L https://bit.ly/glances | /bin/bash
113
114or
115
116.. code-block:: console
117
118    wget -O- https://bit.ly/glances | /bin/bash
119
120*Note*: This is only supported on some GNU/Linux distributions and Mac OS X.
121If you want to support other distributions, please contribute to `glancesautoinstall`_.
122
123PyPI: The simple way
124--------------------
125
126Glances is on ``PyPI``. By using PyPI, you will be using the latest
127stable version.
128
129To install, simply use ``pip``:
130
131.. code-block:: console
132
133    pip install glances
134
135*Note*: Python headers are required to install `psutil`_. For example,
136on Debian/Ubuntu you need to install first the *python-dev* package.
137For Fedora/CentOS/RHEL install first *python-devel* package. For Windows,
138just install psutil from the binary installation file.
139
140*Note 2 (for the Wifi plugin)*: If you want to use the Wifi plugin, you need
141to install the *wireless-tools* package on your system.
142
143You can also install the following libraries in order to use optional
144features (like the Web interface, exports modules...):
145
146.. code-block:: console
147
148    pip install 'glances[action,browser,cloud,cpuinfo,docker,export,folders,gpu,graph,ip,raid,snmp,web,wifi]'
149
150To upgrade Glances to the latest version:
151
152.. code-block:: console
153
154    pip install --upgrade glances
155    pip install --upgrade glances[...]
156
157If you need to install Glances in a specific user location, use:
158
159.. code-block:: console
160
161    export PYTHONUSERBASE=~/mylocalpath
162    pip install --user glances
163
164Docker: the funny way
165---------------------
166
167A Glances container is available. It includes the latest development
168HEAD version. You can use it to monitor your server and all your other
169containers!
170
171Get the Glances container:
172
173.. code-block:: console
174
175    docker pull nicolargo/glances
176
177Run the container in *console mode*:
178
179.. code-block:: console
180
181    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it docker.io/nicolargo/glances
182
183Additionally, if you want to use your own glances.conf file, you can
184create your own Dockerfile:
185
186.. code-block:: console
187
188    FROM nicolargo/glances
189    COPY glances.conf /glances/conf/glances.conf
190    CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
191
192Alternatively, you can specify something along the same lines with
193docker run options:
194
195.. code-block:: console
196
197    docker run -v `pwd`/glances.conf:/glances/conf/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it docker.io/nicolargo/glances
198
199Where \`pwd\`/glances.conf is a local directory containing your glances.conf file.
200
201Run the container in *Web server mode* (notice the `GLANCES_OPT` environment
202variable setting parameters for the glances startup command):
203
204.. code-block:: console
205
206    docker run -d --restart="always" -p 61208-61209:61208-61209 -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host docker.io/nicolargo/glances
207
208GNU/Linux
209---------
210
211`Glances` is available on many Linux distributions, so you should be
212able to install it using your favorite package manager. Be aware that
213when you use this method the operating system `package`_ for `Glances`
214may not be the latest version.
215
216
217FreeBSD
218-------
219
220To install the binary package:
221
222.. code-block:: console
223
224    # pkg install py27-glances
225
226To install Glances from ports:
227
228.. code-block:: console
229
230    # cd /usr/ports/sysutils/py-glances/
231    # make install clean
232
233macOS
234-----
235
236If you do not want to use the glancesautoinstall script, follow this procedure.
237
238macOS users can install Glances using ``Homebrew`` or ``MacPorts``.
239
240Homebrew
241````````
242
243.. code-block:: console
244
245    $ brew install glances
246
247MacPorts
248````````
249
250.. code-block:: console
251
252    $ sudo port install glances
253
254Windows
255-------
256
257Install `Python`_ for Windows (Python 2.7.9+ and 3.4+ ship with pip) and
258then run the following command:
259
260.. code-block:: console
261
262    $ pip install glances
263
264Alternatively, you could clone the repository and install with the following command.
265
266.. code-block:: console
267
268    $ git clone https://github.com/nicolargo/glances.git
269    $ cd glances
270    $ python setup.py install
271
272
273Android
274-------
275
276You need a rooted device and the `Termux`_ application (available on the
277Google Play Store).
278
279Start Termux on your device and enter:
280
281.. code-block:: console
282
283    $ apt update
284    $ apt upgrade
285    $ apt install clang python python-dev
286    $ pip install bottle
287    $ pip install glances
288
289And start Glances:
290
291.. code-block:: console
292
293    $ glances
294
295You can also run Glances in server mode (-s or -w) in order to remotely
296monitor your Android device.
297
298Source
299------
300
301To install Glances from source:
302
303.. code-block:: console
304
305    $ wget https://github.com/nicolargo/glances/archive/vX.Y.tar.gz -O - | tar xz
306    $ cd glances-*
307    # python setup.py install
308
309*Note*: Python headers are required to install psutil.
310
311Chef
312----
313
314An awesome ``Chef`` cookbook is available to monitor your infrastructure:
315https://supermarket.chef.io/cookbooks/glances (thanks to Antoine Rouyer)
316
317Puppet
318------
319
320You can install Glances using ``Puppet``: https://github.com/rverchere/puppet-glances
321
322Ansible
323-------
324
325A Glances ``Ansible`` role is available: https://galaxy.ansible.com/zaxos/glances-ansible-role/
326
327Usage
328=====
329
330For the standalone mode, just run:
331
332.. code-block:: console
333
334    $ glances
335
336For the Web server mode, run:
337
338.. code-block:: console
339
340    $ glances -w
341
342and enter the URL ``http://<ip>:61208`` in your favorite web browser.
343
344For the client/server mode, run:
345
346.. code-block:: console
347
348    $ glances -s
349
350on the server side and run:
351
352.. code-block:: console
353
354    $ glances -c <ip>
355
356on the client one.
357
358You can also detect and display all Glances servers available on your
359network or defined in the configuration file:
360
361.. code-block:: console
362
363    $ glances --browser
364
365You can also display raw stats on stdout:
366
367.. code-block:: console
368
369    $ glances --stdout cpu.user,mem.used,load
370    cpu.user: 30.7
371    mem.used: 3278204928
372    load: {'cpucore': 4, 'min1': 0.21, 'min5': 0.4, 'min15': 0.27}
373    cpu.user: 3.4
374    mem.used: 3275251712
375    load: {'cpucore': 4, 'min1': 0.19, 'min5': 0.39, 'min15': 0.27}
376    ...
377
378or in a CSV format thanks to the stdout-csv option:
379
380.. code-block:: console
381
382    $ glances --stdout-csv now,cpu.user,mem.used,load
383    now,cpu.user,mem.used,load.cpucore,load.min1,load.min5,load.min15
384    2018-12-08 22:04:20 CEST,7.3,5948149760,4,1.04,0.99,1.04
385    2018-12-08 22:04:23 CEST,5.4,5949136896,4,1.04,0.99,1.04
386    ...
387
388and RTFM, always.
389
390Documentation
391=============
392
393For complete documentation have a look at the readthedocs_ website.
394
395If you have any question (after RTFM!), please post it on the official Q&A `forum`_.
396
397Gateway to other services
398=========================
399
400Glances can export stats to: ``CSV`` file, ``JSON`` file, ``InfluxDB``, ``Cassandra``, ``CouchDB``,
401``OpenTSDB``, ``Prometheus``, ``StatsD``, ``ElasticSearch``, ``RabbitMQ/ActiveMQ``,
402``ZeroMQ``, ``Kafka``, ``Riemann`` and ``RESTful`` server.
403
404How to contribute ?
405===================
406
407If you want to contribute to the Glances project, read this `wiki`_ page.
408
409There is also a chat dedicated to the Glances developers:
410
411.. image:: https://badges.gitter.im/Join%20Chat.svg
412        :target: https://gitter.im/nicolargo/glances?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
413
414Donation
415========
416
417If this project help you, you can give me a tip ;)
418
419.. image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
420        :target: https://www.paypal.me/nicolargo
421
422Author
423======
424
425Nicolas Hennion (@nicolargo) <nicolas@nicolargo.com>
426
427.. image:: https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40nicolargo
428    :target: https://twitter.com/nicolargo
429
430License
431=======
432
433Glances is distributed under the LGPL version 3 license. See ``COPYING`` for more details.
434
435.. _psutil: https://github.com/giampaolo/psutil
436.. _glancesautoinstall: https://github.com/nicolargo/glancesautoinstall
437.. _Python: https://www.python.org/getit/
438.. _Termux: https://play.google.com/store/apps/details?id=com.termux
439.. _readthedocs: https://glances.readthedocs.io/
440.. _forum: https://groups.google.com/forum/?hl=en#!forum/glances-users
441.. _wiki: https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-%3F
442.. _package: https://repology.org/metapackage/glances/packages
443