README.rst 5.8 KB
Newer Older
N
Nicolas Hennion 已提交
1 2 3 4 5 6
Follow Glances on Twitter: `@nicolargo`_ or `@glances_system`_

===============================
Glances - An eye on your system
===============================

A
Alessio Sergi 已提交
7
.. image:: https://api.flattr.com/button/flattr-badge-large.png
A
Alessio Sergi 已提交
8
        :target: https://flattr.com/thing/484466/nicolargoglances-on-GitHub
9 10
.. image:: https://scrutinizer-ci.com/g/nicolargo/glances/badges/quality-score.png?b=master
        :target: https://scrutinizer-ci.com/g/nicolargo/glances/
A
Alessio Sergi 已提交
11 12
.. image:: https://travis-ci.org/nicolargo/glances.png?branch=master
        :target: https://travis-ci.org/nicolargo/glances
N
Nicolas Hennion 已提交
13
.. image:: https://badge.fury.io/py/Glances.png
14
        :target: http://badge.fury.io/py/Glances
N
Nicolas Hennion 已提交
15 16 17
.. image:: https://pypip.in/d/Glances/badge.png
        :target: https://pypi.python.org/pypi/Glances/
        :alt: Downloads
N
Nicolas Hennion 已提交
18
.. image:: https://d2weczhvl823v0.cloudfront.net/nicolargo/glances/trend.png
A
Alessio Sergi 已提交
19
        :target: https://bitdeli.com/nicolargo
A
Alessio Sergi 已提交
20

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

It uses the `psutil`_ library to get information from your system.

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
============

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

A
Alessio Sergi 已提交
35 36
Optional dependencies:

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
- ``pysnmp`` (for SNMP support)
N
Nicolargo 已提交
42
- ``zeroconf`` and ``netifaces`` (for the auto discoverer mode)
43
- ``influxdb`` (for the InfluxDB export module)
N
Nicolargo 已提交
44 45
- ``statsd`` (for the StatsD export module)
- ``pystache`` (for the action script feature)
N
Nicolargo 已提交
46
- ``docker-py`` (for the Docker monitoring support) [Linux-only]
A
Alessio Sergi 已提交
47

A
Alessio Sergi 已提交
48 49 50
Installation
============

N
Nicolargo 已提交
51 52 53
Glances Auto Install script
---------------------------

N
Nicolargo 已提交
54
To install both dependacies and latest  Glances version, just enter the following command line:
N
Nicolargo 已提交
55 56 57 58 59

.. code-block:: console

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

60 61 62 63 64 65
or 

.. code-block:: console

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

N
Nicolargo 已提交
66 67 68
*Note*: Only supported on some GNU/Linux distributions.
If you want to support others distribs, please contribute to `glancesautoinstall`_.

A
Alessio Sergi 已提交
69
PyPI: The simple way
N
Nicolas Hennion 已提交
70 71
--------------------

A
Alessio Sergi 已提交
72 73
Glances is on `PyPI`_. By using PyPI, you are sure to have the latest
stable version.
N
Nicolargo 已提交
74 75

To install, simply use `pip`_:
A
Alessio Sergi 已提交
76 77 78 79

.. code-block:: console

    pip install Glances
N
Nicolas Hennion 已提交
80

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

N
Nicolas Hennion 已提交
84 85 86 87 88 89
To upgrade Glances to the latest version:

.. code-block:: console

    pip install --upgrade Glances

N
Nicolargo 已提交
90 91
GNU/Linux
---------
A
Alessio Sergi 已提交
92

N
Nicolargo 已提交
93
At the moment, packages exist for the following GNU/Linux distributions:
A
Alessio Sergi 已提交
94 95 96 97 98

- Arch Linux
- Debian (Testing/Sid)
- Fedora/CentOS/RHEL
- Gentoo
N
Nicolargo 已提交
99
- Slackware (SlackBuild)
A
Alessio Sergi 已提交
100 101 102 103
- Ubuntu (13.04+)
- Void Linux

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

A
Alessio Sergi 已提交
105 106 107
FreeBSD
-------

A
Alessio Sergi 已提交
108
To install the binary package:
A
Alessio Sergi 已提交
109

A
Alessio Sergi 已提交
110 111 112 113
.. code-block:: console

    # pkg install py27-glances

A
Alessio Sergi 已提交
114 115 116
To install Glances from ports:

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

A
Alessio Sergi 已提交
118 119
    # cd /usr/ports/sysutils/py-glances/
    # make install clean
N
Nicolas Hennion 已提交
120

A
Alessio Sergi 已提交
121 122 123
OS X
----

N
Nicolargo 已提交
124
OS X users can install Glances using `Homebrew`_ or `MacPorts`_.
A
Alessio Sergi 已提交
125 126 127 128 129 130

Homebrew
````````

.. code-block:: console

131 132
    $ brew install python
    $ pip install Glances
A
Alessio Sergi 已提交
133 134 135 136 137 138 139 140 141 142 143

MacPorts
````````

.. code-block:: console

    $ sudo port install glances

Windows
-------

A
Alessio Sergi 已提交
144
- Install Python for Windows: http://www.python.org/getit/
145
- Install the psutil library: https://pypi.python.org/pypi?:action=display&name=psutil#downloads
146
- Install the `colorconsole`_ library: http://code.google.com/p/colorconsole/downloads/list
A
Alessio Sergi 已提交
147
- Download Glances from here: http://nicolargo.github.io/glances/
A
Alessio Sergi 已提交
148 149 150 151

Source
------

N
Nicolargo 已提交
152
To install Glances version X.Y from source:
A
Alessio Sergi 已提交
153 154 155

.. code-block:: console

N
Nicolargo 已提交
156
    $ curl -L https://github.com/nicolargo/glances/archive/vX.Y.tar.gz -o glances-X.Y.tar.gz
A
Alessio Sergi 已提交
157 158 159 160
    $ tar -zxvf glances-*.tar.gz
    $ cd glances-*
    # python setup.py install

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

A
Alessio Sergi 已提交
164 165 166 167 168 169 170 171
Puppet
------

You can install Glances using `Puppet`_: https://github.com/rverchere/puppet-glances

Usage
=====

N
Nicolargo 已提交
172
For the standalone mode, just run:
A
Alessio Sergi 已提交
173 174 175

.. code-block:: console

176
    $ glances
A
Alessio Sergi 已提交
177

N
Nicolargo 已提交
178 179 180 181 182 183 184

For the Web server mode, run:

.. code-block:: console

    $ glances -w

A
Alessio Sergi 已提交
185
and enter the URL ``http://<ip>:61208`` in your favorite web browser.
N
Nicolargo 已提交
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200

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.

N
Nicolargo 已提交
201
You can also detect and display all Glances servers available on your network or defined in the configuration file:
N
Nicolargo 已提交
202 203 204

.. code-block:: console

N
Nicolargo 已提交
205
    $ glances --browser
N
Nicolargo 已提交
206

N
Nicolargo 已提交
207
And RTFM, always.
N
Nicolas Hennion 已提交
208

209 210 211
Gateway to others services
==========================

N
Nicolargo 已提交
212
Glances can export stats to: CSV file, InfluxDB and Statsd server.
213

A
Alessio Sergi 已提交
214 215 216
Documentation
=============

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

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

A
Alessio Sergi 已提交
221 222 223 224 225 226 227 228 229 230 231
Author
======

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

License
=======

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

.. _psutil: https://code.google.com/p/psutil/
N
Nicolargo 已提交
232
.. _glancesautoinstall: https://github.com/nicolargo/glancesautoinstall
A
Alessio Sergi 已提交
233 234
.. _@nicolargo: https://twitter.com/nicolargo
.. _@glances_system: https://twitter.com/glances_system
A
Alessio Sergi 已提交
235 236
.. _PyPI: https://pypi.python.org/pypi
.. _pip: http://www.pip-installer.org/
F
fraoustin 已提交
237
.. _colorconsole: https://pypi.python.org/pypi/colorconsole
A
Alessio Sergi 已提交
238
.. _glances-doc: https://github.com/nicolargo/glances/blob/master/docs/glances-doc.rst
N
Nicolargo 已提交
239
.. _forum: https://groups.google.com/forum/?hl=en#!forum/glances-users