README.rst 7.2 KB
Newer Older
N
Nicolas Hennion 已提交
1 2 3 4
===============================
Glances - An eye on your system
===============================

N
nicolargo 已提交
5

N
Nicolargo 已提交
6 7
.. image:: https://img.shields.io/pypi/v/glances.svg
    :target: https://pypi.python.org/pypi/Glances
N
nicolargo 已提交
8 9 10 11 12 13
.. image:: https://img.shields.io/pypi/dm/glances.svg
    :target: https://pypi.python.org/pypi/glances#downloads
    :alt: Downloads this month
.. image:: https://img.shields.io/github/stars/nicolargo/glances.svg
    :target: https://github.com/nicolargo/glances/
    :alt: Github stars
A
Alessio Sergi 已提交
14
.. image:: https://travis-ci.org/nicolargo/glances.svg?branch=master
N
Nicolargo 已提交
15 16 17
    :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
18
.. image:: https://img.shields.io/scrutinizer/g/nicolargo/glances.svg
N
Nicolargo 已提交
19
    :target: https://scrutinizer-ci.com/g/nicolargo/glances/
20
.. image:: https://api.flattr.com/button/flattr-badge-large.png
N
Nicolargo 已提交
21
    :target: https://flattr.com/thing/484466/nicolargoglances-on-GitHub
N
Nicolargo 已提交
22 23 24

Follow Glances on Twitter: `@nicolargo`_ or `@glances_system`_

A
Alessio Sergi 已提交
25 26
**Glances** is a cross-platform curses-based system monitoring tool
written in Python.
A
Alessio Sergi 已提交
27

A
Alessio Sergi 已提交
28
.. image:: https://raw.github.com/nicolargo/glances/master/docs/images/screenshot-wide.png
A
Alessio Sergi 已提交
29 30 31 32

Requirements
============

A
Alessio Sergi 已提交
33
- ``python >= 2.6`` or ``>= 3.3`` (tested with version 2.6, 2.7, 3.3, 3.4, 3.5)
A
Alessio Sergi 已提交
34
- ``psutil >= 2.0.0``
A
Alessio Sergi 已提交
35 36
- ``setuptools``

A
Alessio Sergi 已提交
37
Optional dependencies:
A
Alessio Sergi 已提交
38

A
Alessio Sergi 已提交
39
- ``bottle`` (for Web server mode)
N
Nicolargo 已提交
40
- ``py3sensors`` (for hardware monitoring support) [Linux-only]
A
Alessio Sergi 已提交
41
- ``hddtemp`` (for HDD temperature monitoring support) [Linux-only]
A
Alessio Sergi 已提交
42
- ``batinfo`` (for battery monitoring support) [Linux-only]
A
Alessio Sergi 已提交
43
- ``pymdstat`` (for RAID support) [Linux-only]
A
Alessio Sergi 已提交
44
- ``pysnmp`` (for SNMP support)
45 46
- ``zeroconf`` (for the autodiscover mode)
- ``netifaces`` (for the IP plugin)
47
- ``influxdb`` (for the InfluxDB export module)
N
Nicolargo 已提交
48 49
- ``statsd`` (for the StatsD export module)
- ``pystache`` (for the action script feature)
N
Nicolargo 已提交
50
- ``docker-py`` (for the Docker monitoring support) [Linux-only]
51
- ``matplotlib`` (for graphical/chart support)
N
Nicolargo 已提交
52
- ``pika`` (for the RabbitMQ/ActiveMQ export module)
53
- ``py-cpuinfo`` (for the Quicklook CPU info module)
N
nicolargo 已提交
54
- ``scandir`` (for the Folders plugin) [Only for Python < 3.5]
A
Alessio Sergi 已提交
55

A
Alessio Sergi 已提交
56 57 58
Installation
============

N
Nicolargo 已提交
59 60 61
Glances Auto Install script
---------------------------

A
Alessio Sergi 已提交
62 63
To install both dependencies and latest Glances production ready version
(aka *master* branch), just enter the following command line:
N
Nicolargo 已提交
64 65 66 67 68

.. code-block:: console

    curl -L http://bit.ly/glances | /bin/bash

A
Alessio Sergi 已提交
69
or
70 71 72 73 74

.. code-block:: console

    wget -O- http://bit.ly/glances | /bin/bash

A
Alessio Sergi 已提交
75 76
*Note*: Only supported on some GNU/Linux distributions. If you want to
support other distributions, please contribute to `glancesautoinstall`_.
N
Nicolargo 已提交
77

A
Alessio Sergi 已提交
78
PyPI: The simple way
N
Nicolas Hennion 已提交
79 80
--------------------

A
Alessio Sergi 已提交
81
Glances is on ``PyPI``. By using PyPI, you are sure to have the latest
A
Alessio Sergi 已提交
82
stable version.
N
Nicolargo 已提交
83

A
Alessio Sergi 已提交
84
To install, simply use ``pip``:
A
Alessio Sergi 已提交
85 86 87

.. code-block:: console

N
Nicolargo 已提交
88
    pip install glances
N
Nicolas Hennion 已提交
89

N
nicolargo 已提交
90
*Note*: Python headers are required to install `psutil`_. For example,
A
Alessio Sergi 已提交
91
on Debian/Ubuntu you need to install first the *python-dev* package.
92
For Fedora/CentOS/RHEL install first *python-devel* package.
A
Alessio Sergi 已提交
93

A
Alessio Sergi 已提交
94
You can also install the following libraries in order to use optional
95
features (like the Web interface):
N
Nicolargo 已提交
96 97 98

.. code-block:: console

N
nicolargo 已提交
99
    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
N
Nicolargo 已提交
100

101
Install or upgrade Glances from the Git ``develop`` repository:
N
Nicolargo 已提交
102 103 104

.. code-block:: console

105
    git clone -b develop https://github.com/nicolargo/glances.git
N
Nicolargo 已提交
106

N
Nicolargo 已提交
107

N
Nicolas Hennion 已提交
108 109 110 111
To upgrade Glances to the latest version:

.. code-block:: console

N
Nicolargo 已提交
112
    pip install --upgrade glances
N
Nicolas Hennion 已提交
113

N
Nicolargo 已提交
114 115 116 117 118
If you need to install Glances in a specific user location, use:

.. code-block:: console

    export PYTHONUSERBASE=~/mylocalpath
N
Nicolargo 已提交
119
    pip install --user glances
N
Nicolargo 已提交
120

N
Nicolargo 已提交
121 122
GNU/Linux
---------
A
Alessio Sergi 已提交
123

N
Nicolargo 已提交
124
At the moment, packages exist for the following GNU/Linux distributions:
A
Alessio Sergi 已提交
125 126

- Arch Linux
N
Nicolargo 已提交
127
- Debian
A
Alessio Sergi 已提交
128 129
- Fedora/CentOS/RHEL
- Gentoo
N
Nicolargo 已提交
130
- Slackware (SlackBuild)
N
Nicolargo 已提交
131
- Ubuntu
A
Alessio Sergi 已提交
132 133 134
- Void Linux

So you should be able to install it using your favorite package manager.
A
Alessio Sergi 已提交
135

A
Alessio Sergi 已提交
136 137 138
FreeBSD
-------

A
Alessio Sergi 已提交
139
To install the binary package:
A
Alessio Sergi 已提交
140

A
Alessio Sergi 已提交
141 142 143 144
.. code-block:: console

    # pkg install py27-glances

A
Alessio Sergi 已提交
145 146 147
To install Glances from ports:

.. code-block:: console
A
Alessio Sergi 已提交
148

A
Alessio Sergi 已提交
149 150
    # cd /usr/ports/sysutils/py-glances/
    # make install clean
N
Nicolas Hennion 已提交
151

A
Alessio Sergi 已提交
152 153 154
OS X
----

A
Alessio Sergi 已提交
155
OS X users can install Glances using ``Homebrew`` or ``MacPorts``.
A
Alessio Sergi 已提交
156 157 158 159 160 161

Homebrew
````````

.. code-block:: console

162
    $ brew install python
N
Nicolargo 已提交
163
    $ pip install glances
A
Alessio Sergi 已提交
164 165 166 167 168 169 170 171 172 173 174

MacPorts
````````

.. code-block:: console

    $ sudo port install glances

Windows
-------

175 176
Install `Python`_ for Windows (Python 2.7.9+ and 3.4+ ship with pip) and
then just:
N
Nicolargo 已提交
177 178 179 180

.. code-block:: console

    $ pip install glances
A
Alessio Sergi 已提交
181 182 183 184

Source
------

A
Alessio Sergi 已提交
185
To install Glances from source:
A
Alessio Sergi 已提交
186 187 188

.. code-block:: console

189
    $ wget https://github.com/nicolargo/glances/archive/vX.Y.tar.gz -O - | tar xz
A
Alessio Sergi 已提交
190 191 192
    $ cd glances-*
    # python setup.py install

A
Alessio Sergi 已提交
193 194
*Note*: Python headers are required to install psutil. For example,
on Debian/Ubuntu you need to install first the *python-dev* package.
195

N
nicolargo 已提交
196 197 198 199 200
Chef
----

An awesome ``Chef`` cookbook is available to monitor your infrastructure: https://supermarket.chef.io/cookbooks/glances (thanks to Antoine Rouyer)

A
Alessio Sergi 已提交
201 202 203
Puppet
------

A
Alessio Sergi 已提交
204
You can install Glances using ``Puppet``: https://github.com/rverchere/puppet-glances
A
Alessio Sergi 已提交
205 206 207 208

Usage
=====

N
Nicolargo 已提交
209
For the standalone mode, just run:
A
Alessio Sergi 已提交
210 211 212

.. code-block:: console

213
    $ glances
A
Alessio Sergi 已提交
214

N
Nicolargo 已提交
215 216 217 218 219 220
For the Web server mode, run:

.. code-block:: console

    $ glances -w

A
Alessio Sergi 已提交
221
and enter the URL ``http://<ip>:61208`` in your favorite web browser.
N
Nicolargo 已提交
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236

For the client/server mode, run:

.. code-block:: console

    $ glances -s

on the server side and run:

.. code-block:: console

    $ glances -c <ip>

on the client one.

A
Alessio Sergi 已提交
237 238
You can also detect and display all Glances servers available on your
network or defined in the configuration file:
N
Nicolargo 已提交
239 240 241

.. code-block:: console

N
Nicolargo 已提交
242
    $ glances --browser
N
Nicolargo 已提交
243

A
Alessio Sergi 已提交
244
and RTFM, always.
N
Nicolas Hennion 已提交
245

A
Alessio Sergi 已提交
246 247 248
Documentation
=============

A
Alessio Sergi 已提交
249
For complete documentation see `glances-doc`_.
A
Alessio Sergi 已提交
250

A
Alessio Sergi 已提交
251
If you have any question (after RTFM!), please post it on the official Q&A `forum`_.
N
Nicolargo 已提交
252

N
Nicolargo 已提交
253 254 255
Gateway to other services
=========================

256 257
Glances can export stats to: ``CSV`` file, ``InfluxDB``, ``OpenTSDB``,
``StatsD`` and ``RabbitMQ`` server.
N
Nicolargo 已提交
258

N
Nicolargo 已提交
259 260 261
How to contribute ?
===================

262
If you want to contribute to the Glances project, read this `wiki`_ page.
N
Nicolargo 已提交
263

A
Alessio Sergi 已提交
264
There is also a chat dedicated to the Glances developers:
N
Nicolargo 已提交
265 266 267 268

.. image:: https://badges.gitter.im/Join%20Chat.svg
        :target: https://gitter.im/nicolargo/glances?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

A
Alessio Sergi 已提交
269 270 271 272 273 274 275 276 277 278
Author
======

Nicolas Hennion (@nicolargo) <nicolas@nicolargo.com>

License
=======

LGPL. See ``COPYING`` for more details.

A
Alessio Sergi 已提交
279
.. _psutil: https://github.com/giampaolo/psutil
N
Nicolargo 已提交
280
.. _glancesautoinstall: https://github.com/nicolargo/glancesautoinstall
A
Alessio Sergi 已提交
281 282
.. _@nicolargo: https://twitter.com/nicolargo
.. _@glances_system: https://twitter.com/glances_system
283
.. _Python: https://www.python.org/getit/
A
Alessio Sergi 已提交
284
.. _glances-doc: https://github.com/nicolargo/glances/blob/master/docs/glances-doc.rst
N
Nicolargo 已提交
285
.. _forum: https://groups.google.com/forum/?hl=en#!forum/glances-users
286
.. _wiki: https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-%3F