summaryrefslogtreecommitdiffstats
path: root/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst129
1 files changed, 64 insertions, 65 deletions
diff --git a/README.rst b/README.rst
index 6ae2ac14..be8550ae 100644
--- a/README.rst
+++ b/README.rst
@@ -2,38 +2,42 @@
Glances - An eye on your system
===============================
-.. image:: https://img.shields.io/pypi/v/glances.svg
+| |pypi| |test| |contibutors| |quality|
+| |starts| |docker| |pypistat|
+| |sponsors| |twitter|
+
+.. |pypi| image:: https://img.shields.io/pypi/v/glances.svg
:target: https://pypi.python.org/pypi/Glances
-.. image:: https://img.shields.io/github/stars/nicolargo/glances.svg
+.. |starts| image:: https://img.shields.io/github/stars/nicolargo/glances.svg
:target: https://github.com/nicolargo/glances/
:alt: Github stars
-.. image:: https://img.shields.io/docker/pulls/nicolargo/glances
+.. |docker| image:: https://img.shields.io/docker/pulls/nicolargo/glances
:target: https://hub.docker.com/r/nicolargo/glances/
:alt: Docker pull
-.. image:: https://pepy.tech/badge/glances/month
+.. |pypistat| image:: https://pepy.tech/badge/glances/month
:target: https://pepy.tech/project/glances
:alt: Pypi downloads
-.. image:: https://github.com/nicolargo/glances/actions/workflows/test.yml/badge.svg
+.. |test| image:: https://github.com/nicolargo/glances/actions/workflows/ci.yml/badge.svg?branch=develop
:target: https://github.com/nicolargo/glances/actions
:alt: Linux tests (GitHub Actions)
-.. image:: https://img.shields.io/github/contributors/nicolargo/glances
+.. |contibutors| image:: https://img.shields.io/github/contributors/nicolargo/glances
:target: https://github.com/nicolargo/glances/issues?q=is%3Aissue+is%3Aopen+label%3A%22needs+contributor%22
:alt: Contibutors
-.. image:: https://scrutinizer-ci.com/g/nicolargo/glances/badges/quality-score.png?b=develop
+.. |quality| image:: https://scrutinizer-ci.com/g/nicolargo/glances/badges/quality-score.png?b=develop
:target: https://scrutinizer-ci.com/g/nicolargo/glances/?branch=develop
:alt: Code quality
-.. image:: https://img.shields.io/github/sponsors/nicolargo
+.. |sponsors| image:: https://img.shields.io/github/sponsors/nicolargo
:target: https://github.com/sponsors/nicolargo
:alt: Sponsors
-.. image:: https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40nicolargo
+.. |twitter| image:: https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40nicolargo
:target: https://twitter.com/nicolargo
:alt: @nicolargo
@@ -78,52 +82,48 @@ Any and all contributions are greatly appreciated.
Requirements
============
-- ``python>=2.7`` or ``python>=3.4``
-- ``psutil>=5.3.0`` (better with latest version)
+- ``python>=3.8`` (use Glances 3.4.x for lower Python version)
+- ``psutil`` (better with latest version)
- ``defusedxml`` (in order to monkey patch xmlrpc)
+- ``packaging`` (for the version comparison)
- ``ujson`` (an optimized alternative to the standard json module)
-- ``future`` (for Python 2 support)
-
-*Note for Python 2.6 users*
-
-Glances no longer supports Python 2.6. Please upgrade
-to a minimum Python version of 2.7/3.4+ or downgrade to Glances 2.6.2 (last version
-with Python 2.6 support).
+- ``pydantic`` (for the data validation support)
-*Deprecation warning note for Python 2.x users*
+*Note for Python 2 users*
-Glances version 4.0 will no longer supports Python 2.x.
+Glances version 4 or higher do not support Python 2 (and Python 3 < 3.8).
+Please uses Glances version 3.4.x if you need Python 2 support.
Optional dependencies:
- ``batinfo`` (for battery monitoring)
- ``bernhard`` (for the Riemann export module)
-- ``bottle`` (for Web server mode)
- ``cassandra-driver`` (for the Cassandra export module)
- ``chevron`` (for the action script feature)
-- ``couchdb`` (for the CouchDB export module)
-- ``docker`` (for the Containers Docker monitoring support) [Linux/macOS-only / Python >= 3.6]
+- ``docker`` (for the Containers Docker monitoring support)
- ``elasticsearch`` (for the Elastic Search export module)
+- ``FastAPI`` and ``Uvicorn`` (for Web server mode)
- ``graphitesender`` (For the Graphite export module)
- ``hddtemp`` (for HDD temperature monitoring support) [Linux-only]
- ``influxdb`` (for the InfluxDB version 1 export module)
-- ``influxdb-client`` (for the InfluxDB version 2 export module) [Only for Python >= 3.6]
+- ``influxdb-client`` (for the InfluxDB version 2 export module)
+- ``jinja2`` (for templating, used under the hood by FastAPI)
- ``kafka-python`` (for the Kafka export module)
- ``netifaces`` (for the IP plugin)
-- ``py3nvml`` (for the GPU plugin) [Only for Python 3]
+- ``nvidia-ml-py`` (for the GPU plugin)
+- ``pycouchdb`` (for the CouchDB export module)
- ``pika`` (for the RabbitMQ/ActiveMQ export module)
-- ``podman`` (for the Containers Podman monitoring support) [Linux/macOS-only / Python >= 3.6]
+- ``podman`` (for the Containers Podman monitoring support)
- ``potsdb`` (for the OpenTSDB export module)
- ``prometheus_client`` (for the Prometheus export module)
- ``py-cpuinfo`` (for the Quicklook CPU info module)
- ``pygal`` (for the graph export module)
- ``pymdstat`` (for RAID support) [Linux-only]
-- ``pymongo`` (for the MongoDB export module) [Only for Python >= 3.7]
-- ``pysnmp`` (for SNMP support)
+- ``pymongo`` (for the MongoDB export module)
+- ``pysnmp-lextudio`` (for SNMP support)
- ``pySMART.smartx`` (for HDD Smart support) [Linux-only]
- ``pyzmq`` (for the ZeroMQ export module)
- ``requests`` (for the Ports, Cloud plugins and RESTful export module)
-- ``scandir`` (for the Folders plugin) [Only for Python < 3.5]
- ``sparklines`` (for the Quick Plugin sparklines option)
- ``statsd`` (for the StatsD export module)
- ``wifi`` (for the wifi plugin) [Linux-only]
@@ -134,26 +134,27 @@ Installation
There are several methods to test/install Glances on your system. Choose your weapon!
-PyPI: The standard way
-----------------------
+PyPI: Pip, the standard way
+---------------------------
Glances is on ``PyPI``. By using PyPI, you will be using the latest
stable version.
-To install Glances, simply use ``pip``:
+To install Glances, simply use the ``pip`` command line.
+
+Warning: on modern Linux operating systems, you may have an externally-managed-environment
+error message when you try to use ``pip``. In this case, go to the the PipX section bellow.
.. code-block:: console
pip install --user glances
*Note*: Python headers are required to install `psutil`_, a Glances
-dependency. For example, on Debian/Ubuntu you need to install first
-the *python-dev* package (*python-devel* on Fedora/CentOS/RHEL).
+dependency. For example, on Debian/Ubuntu **the simplest** is
+``apt install python3-psutil`` or alternatively need to install first
+the *python-dev* package and gcc (*python-devel* on Fedora/CentOS/RHEL).
For Windows, just install psutil from the binary installation file.
-*Note 2 (for the Wifi plugin)*: If you want to use the Wifi plugin, you need
-to install the *wireless-tools* package on your system.
-
By default, Glances is installed without the Web interface dependencies.
To install it, use the following command:
@@ -180,27 +181,21 @@ If you want to test the develop version (could be instable), enter:
pip install --user -i https://test.pypi.org/simple/ Glances
-Glances Auto Install script: the easy way
------------------------------------------
+PyPI: PipX, the alternative way
+-------------------------------
-To install both dependencies and the latest Glances production ready version
-(aka *master* branch), just enter the following command line:
+Install PipX on your system (apt install pipx on Ubuntu).
-.. code-block:: console
-
- curl -L https://bit.ly/glances | /bin/bash
-
-or
+Install Glances (with all features):
.. code-block:: console
- wget -O- https://bit.ly/glances | /bin/bash
+ pipx install 'glances[all]'
-*Note*: This is only supported on some GNU/Linux distributions and Mac OS X.
-If you want to support other distributions, please contribute to `glancesautoinstall`_.
+The glances script will be installed in the ~/.local/bin folder.
-Docker: the fun way
--------------------
+Docker: the cloudy way
+----------------------
Glances Docker images are availables. You can use it to monitor your
server and all your containers !
@@ -214,17 +209,19 @@ Get the Glances container:
The following tags are availables:
- *latest-full* for a full Alpine Glances image (latest release) with all dependencies
-- *latest* for a basic Alpine Glances (latest release) version with minimal dependencies (Bottle and Docker)
+- *latest* for a basic Alpine Glances (latest release) version with minimal dependencies (FastAPI and Docker)
- *dev* for a basic Alpine Glances image (based on development branch) with all dependencies (Warning: may be instable)
- *ubuntu-latest-full* for a full Ubuntu Glances image (latest release) with all dependencies
-- *ubuntu-latest* for a basic Ubuntu Glances (latest release) version with minimal dependencies (Bottle and Docker)
+- *ubuntu-latest* for a basic Ubuntu Glances (latest release) version with minimal dependencies (FastAPI and Docker)
- *ubuntu-dev* for a basic Ubuntu Glances image (based on development branch) with all dependencies (Warning: may be instable)
Run last version of Glances container in *console mode*:
.. code-block:: console
- docker run --rm -e TZ="${TZ}" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it nicolargo/glances:latest-full
+ docker run --rm -e TZ="${TZ}" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host --network host -it nicolargo/glances:latest-full
+
+By default, the /etc/glances/glances.conf file is used (based on docker-compose/glances.conf).
By default, the /etc/glances/glances.conf file is used (based on docker-compose/glances.conf).
@@ -243,30 +240,31 @@ variable setting parameters for the glances startup command):
.. code-block:: console
- docker run -e TZ="${TZ}" -v `pwd`/glances.conf:/root/.config/glances/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host -e GLANCES_OPT="-C /root/.config/glances/glances.conf" -it nicolargo/glances:latest-full
+ docker run -e TZ="${TZ}" -v $HOME/.config/glances/glances.conf:/glances.conf:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host -e GLANCES_OPT="-C /glances.conf" -it nicolargo/glances:latest-full
-Where \`pwd\`/glances.conf is a local directory containing your glances.conf file.
+Where $HOME/.config/glances/glances.conf is a local directory containing your glances.conf file.
Run the container in *Web server mode*:
.. code-block:: console
- docker run -d --restart="always" -p 61208-61209:61208-61209 -e TZ="${TZ}" -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host nicolargo/glances:latest-full
+ docker run -d --restart="always" -p 61208-61209:61208-61209 -e TZ="${TZ}" -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host nicolargo/glances:latest-full
For a full list of options, see the Glances `Docker`_ documentation page.
-GNU/Linux
----------
+GNU/Linux package
+-----------------
`Glances` is available on many Linux distributions, so you should be
able to install it using your favorite package manager. Be aware that
when you use this method the operating system `package`_ for `Glances`
-may not be the latest version.
+may not be the latest version and only basics plugins are enabled.
Note: The Debian package (and all other Debian-based distributions) do
not include anymore the JS statics files used by the Web interface
(see ``issue2021``). If you want to add it to your Glances installation,
-follow the instructions: ``issue2021comment``.
+follow the instructions: ``issue2021comment``. In Glances version 4 and
+higher, the path to the statics file is configurable (see ``issue2612``).
FreeBSD
-------
@@ -275,7 +273,7 @@ To install the binary package:
.. code-block:: console
- # pkg install py38-glances
+ # pkg install py39-glances
To install Glances from ports:
@@ -308,7 +306,7 @@ MacPorts
Windows
-------
-Install `Python`_ for Windows (Python 2.7.9+ and 3.4+ ship with pip) and
+Install `Python`_ for Windows (Python 3.4+ ship with pip) and
then run the following command:
.. code-block:: console
@@ -328,7 +326,7 @@ Start Termux on your device and enter:
$ apt update
$ apt upgrade
$ apt install clang python
- $ pip install bottle
+ $ pip install fastapi uvicorn jinja2
$ pip install glances
And start Glances:
@@ -488,6 +486,7 @@ Glances is distributed under the LGPL version 3 license. See ``COPYING`` for mor
.. _package: https://repology.org/project/glances/versions
.. _sponsors: https://github.com/sponsors/nicolargo
.. _wishlist: https://www.amazon.fr/hz/wishlist/ls/BWAAQKWFR3FI?ref_=wl_share
-.. _issue2021: https://github.com/nicolargo/glances/issues/2021#issuecomment-1197831157
+.. _issue2021: https://github.com/nicolargo/glances/issues/2021
.. _issue2021comment: https://github.com/nicolargo/glances/issues/2021#issuecomment-1197831157
+.. _issue2612: https://github.com/nicolargo/glances/issues/2612
.. _Docker: https://github.com/nicolargo/glances/blob/develop/docs/docker.rst