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

N
nicolargo 已提交
5 6 7 8 9 10 11

.. 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 已提交
12
.. image:: https://travis-ci.org/nicolargo/glances.svg?branch=master
A
Alessio Sergi 已提交
13
        :target: https://travis-ci.org/nicolargo/glances
14 15 16 17 18 19
.. image:: https://img.shields.io/pypi/v/glances.svg
        :target: https://pypi.python.org/pypi/Glances
.. image:: https://img.shields.io/scrutinizer/g/nicolargo/glances.svg
        :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
N
Nicolargo 已提交
20 21 22

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

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

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

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

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

A
Alessio Sergi 已提交
35
Optional dependencies:
A
Alessio Sergi 已提交
36

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

A
Alessio Sergi 已提交
54 55 56
Installation
============

N
Nicolargo 已提交
57 58 59
Glances Auto Install script
---------------------------

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

.. code-block:: console

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

A
Alessio Sergi 已提交
67
or
68 69 70 71 72

.. code-block:: console

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

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

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

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

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

.. code-block:: console

N
Nicolargo 已提交
86
    pip install glances
N
Nicolas Hennion 已提交
87

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

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

.. code-block:: console

N
nicolargo 已提交
97
    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 已提交
98

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

.. code-block:: console

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

N
Nicolargo 已提交
105

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

.. code-block:: console

N
Nicolargo 已提交
110
    pip install --upgrade glances
N
Nicolas Hennion 已提交
111

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

.. code-block:: console

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

N
Nicolargo 已提交
119 120
GNU/Linux
---------
A
Alessio Sergi 已提交
121

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

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

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

A
Alessio Sergi 已提交
134 135 136
FreeBSD
-------

A
Alessio Sergi 已提交
137
To install the binary package:
A
Alessio Sergi 已提交
138

A
Alessio Sergi 已提交
139 140 141 142
.. code-block:: console

    # pkg install py27-glances

A
Alessio Sergi 已提交
143 144 145
To install Glances from ports:

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

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

A
Alessio Sergi 已提交
150 151 152
OS X
----

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

Homebrew
````````

.. code-block:: console

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

MacPorts
````````

.. code-block:: console

    $ sudo port install glances

Windows
-------

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

.. code-block:: console

    $ pip install glances
A
Alessio Sergi 已提交
179 180 181 182

Source
------

A
Alessio Sergi 已提交
183
To install Glances from source:
A
Alessio Sergi 已提交
184 185 186

.. code-block:: console

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

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

A
Alessio Sergi 已提交
194 195 196
Puppet
------

A
Alessio Sergi 已提交
197
You can install Glances using ``Puppet``: https://github.com/rverchere/puppet-glances
A
Alessio Sergi 已提交
198 199 200 201

Usage
=====

N
Nicolargo 已提交
202
For the standalone mode, just run:
A
Alessio Sergi 已提交
203 204 205

.. code-block:: console

206
    $ glances
A
Alessio Sergi 已提交
207

N
Nicolargo 已提交
208 209 210 211 212 213
For the Web server mode, run:

.. code-block:: console

    $ glances -w

A
Alessio Sergi 已提交
214
and enter the URL ``http://<ip>:61208`` in your favorite web browser.
N
Nicolargo 已提交
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229

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 已提交
230 231
You can also detect and display all Glances servers available on your
network or defined in the configuration file:
N
Nicolargo 已提交
232 233 234

.. code-block:: console

N
Nicolargo 已提交
235
    $ glances --browser
N
Nicolargo 已提交
236

A
Alessio Sergi 已提交
237
and RTFM, always.
N
Nicolas Hennion 已提交
238

A
Alessio Sergi 已提交
239 240 241
Documentation
=============

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

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

N
Nicolargo 已提交
246 247 248
Gateway to other services
=========================

249 250
Glances can export stats to: ``CSV`` file, ``InfluxDB``, ``OpenTSDB``,
``StatsD`` and ``RabbitMQ`` server.
N
Nicolargo 已提交
251

N
Nicolargo 已提交
252 253 254
How to contribute ?
===================

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

A
Alessio Sergi 已提交
257
There is also a chat dedicated to the Glances developers:
N
Nicolargo 已提交
258 259 260 261

.. 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 已提交
262 263 264 265 266 267 268 269 270 271
Author
======

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

License
=======

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

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