Metadata-Version: 2.4
Name: Glances
Version: 5.0.0
Summary: An all-in-one system monitoring tool
Author-email: Nicolas Hennion <nicolas@nicolargo.com>
License-Expression: LGPL-3.0-only
Project-URL: Homepage, https://github.com/nicolargo/glances
Keywords: cli,curses,monitoring,system
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console :: Curses
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: COPYING
License-File: AUTHORS
Requires-Dist: psutil>=5.6.7
Requires-Dist: requests>=2.32.4
Requires-Dist: windows-curses; platform_system == "Windows"
Requires-Dist: shtab; platform_system != "Windows"
Requires-Dist: jinja2>=3.1.6
Provides-Extra: action
Requires-Dist: chevron; extra == "action"
Provides-Extra: all
Requires-Dist: glances[action,browser,cloud,containers,export,gpu,graph,llm-anthropic,llm-litellm,llm-ollama,llm-openai,mcp,raid,sensors,smart,web,wifi]; extra == "all"
Provides-Extra: server
Requires-Dist: glances[browser,mcp,web]; extra == "server"
Provides-Extra: browser
Requires-Dist: zeroconf; extra == "browser"
Provides-Extra: cloud
Requires-Dist: requests>=2.32.4; extra == "cloud"
Provides-Extra: containers
Requires-Dist: docker>=6.1.1; extra == "containers"
Requires-Dist: podman; extra == "containers"
Requires-Dist: pylxd>=2.3.1; extra == "containers"
Requires-Dist: python-dateutil; extra == "containers"
Provides-Extra: export
Requires-Dist: bernhard; extra == "export"
Requires-Dist: clickhouse-connect; extra == "export"
Requires-Dist: elasticsearch; extra == "export"
Requires-Dist: graphitesender; extra == "export"
Requires-Dist: influxdb-client; extra == "export"
Requires-Dist: influxdb>=1.0.0; extra == "export"
Requires-Dist: influxdb3-python; extra == "export"
Requires-Dist: kafka-python; extra == "export"
Requires-Dist: nats-py; extra == "export"
Requires-Dist: paho-mqtt; extra == "export"
Requires-Dist: pika; extra == "export"
Requires-Dist: potsdb; extra == "export"
Requires-Dist: prometheus_client; extra == "export"
Requires-Dist: psycopg[binary]; extra == "export"
Requires-Dist: pycouchdb; extra == "export"
Requires-Dist: pymongo; extra == "export"
Requires-Dist: pyzmq; extra == "export"
Requires-Dist: statsd; extra == "export"
Provides-Extra: gpu
Requires-Dist: nvidia-ml-py; extra == "gpu"
Provides-Extra: graph
Requires-Dist: pygal; extra == "graph"
Provides-Extra: llm-anthropic
Requires-Dist: anthropic; extra == "llm-anthropic"
Provides-Extra: llm-litellm
Requires-Dist: litellm>=1.100.4; extra == "llm-litellm"
Requires-Dist: tenacity; extra == "llm-litellm"
Provides-Extra: llm-ollama
Requires-Dist: openai; extra == "llm-ollama"
Provides-Extra: llm-openai
Requires-Dist: openai; extra == "llm-openai"
Provides-Extra: mcp
Requires-Dist: mcp<3,>=1.23.0; extra == "mcp"
Provides-Extra: raid
Requires-Dist: pymdstat; extra == "raid"
Provides-Extra: sensors
Requires-Dist: batinfo; platform_system == "Linux" and extra == "sensors"
Provides-Extra: smart
Requires-Dist: pySMART; extra == "smart"
Provides-Extra: web
Requires-Dist: fastapi>=0.82.0; extra == "web"
Requires-Dist: msgpack>=1.2.3; platform_system != "Windows" and extra == "web"
Requires-Dist: PyJWT>=2.10.0; extra == "web"
Requires-Dist: requests>=2.32.4; extra == "web"
Requires-Dist: starlette>=0.49.1; extra == "web"
Requires-Dist: uvicorn; extra == "web"
Provides-Extra: wifi
Dynamic: license-file

Glances 🌟
==========

**Glances** is an open-source, cross-platform system monitoring tool.
It shows in real time CPU, memory, load, disks, file systems, network, sensors
(temperatures, voltages, fans, battery), GPUs, NPUs and processes.
It also monitors containers (Docker, Podman, LXD) and virtual machines
(Multipass, libvirt). Everything is presented in an easy-to-read dashboard,
in the terminal or in a Web browser, and you choose what to display.

In client/server mode, remote monitoring could be done via terminal,
Web interface or RESTful API.
Stats can also be exported to files or external time/value databases, CSV or direct
output to STDOUT.

AI assistants (Claude, Cursor, …) can query Glances directly through the built-in
MCP server.

Glances is written in Python and uses libraries to grab information from
your system. It is based on an open architecture where developers can
add new plugins or exports modules. It can also be used as a Python library
in your own scripts and notebooks.

Usage 👋
========

Glances can be used in the following modes.

1. TUI (standalone mode)
------------------------

Monitor the local machine in your terminal:

.. code-block:: console

    $ glances

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/glances-summary.png

Press ``h`` in the interface to display the hotkeys.

2. WebUI (Web server mode)
--------------------------

Start the Web server (REST API and WebUI):

.. code-block:: console

    $ glances -s

(``-w`` is an alias of ``-s``) and enter the URL ``http://localhost:61208`` in your
favorite web browser.

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/glances-webui-with-alert.png

The server listens on ``127.0.0.1`` by default. To reach it from another machine,
listen on all interfaces with ``-B 0.0.0.0`` (or ``bind_address`` in the ``[outputs]``
section of the configuration file) and enter the URL ``http://<ip>:61208``.

It's also propose additional features like charts:

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/webui-cpu-chart.png

and alerts summary:

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/webui-alert-list.png

The same server exposes a HTTP/RESTful API under ``/api/5``, see the `RestfulApi`_
documentation. It is **not protected by default**, see `Advanced usage 🔧`_ to set a
password.

3. TUI client / server mode
---------------------------

Start a server on the machine to monitor:

.. code-block:: console

    server$ glances -s -B 0.0.0.0

and display it in the terminal of another machine:

.. code-block:: console

    client$ glances -c <server_ip>

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/glances-client-server.png

The client reads the stats from the server REST API (use ``--password`` to be
prompted for the server password). A Glances 5 client only talks to a Glances 5 server.

4. TUI browser
--------------

List all Glances servers available on your network (Zeroconf) or defined in the
``[serverlist]`` section of the configuration file, then open one of them:

.. code-block:: console

    $ glances --browser

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/browser.png

5. WebUI browser
----------------

The same servers list, served in a Web page at ``http://<ip>:61208/browser``:

.. code-block:: console

    $ glances -s --browser

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/screenshot-webui-browser.png

6. MCP server
-------------

Start the Web server with the `MCP (Model Context Protocol)`_ server enabled:

.. code-block:: console

    $ glances -s --enable-mcp

The MCP endpoint is then available at ``http://<ip>:61208/mcp`` (Streamable HTTP)
and ``http://<ip>:61208/mcp/sse`` (SSE, for older clients); the startup log gives both.
Plug it into your AI assistant (here `opencode`_) and ask it for the state of the machine:

.. code-block:: console

    $ opencode mcp add glances --url http://localhost:61208/mcp

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/screenshot-mcp-opencode.png

See the `McpApi`_ documentation for client configuration and usage.

7. Fetch mode
-------------

Get (and share) a quick look of a machine, then exit:

.. code-block:: console

    $ glances --fetch

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/screenshot-fetch.png

The output can be customized with a Jinja template (``--fetch-template``),
see the `Fetch`_ documentation.

Gateway to other services 🌐
============================

Glances can export its stats to:

.. list-table::
   :widths: 25 75

   * - 📁 **Files**
     - |csv| |json| |graph|
   * - 📈 **Time series**
     - |influxdb| |prometheus| |timescaledb| |graphite| |opentsdb| |statsd| |riemann|
   * - 🗄️ **Databases**
     - |elasticsearch| |clickhouse| |duckdb| |mongodb| |cassandra| |couchdb|
   * - 📨 **Message brokers**
     - |kafka| |rabbitmq| |mqtt| |nats| |zeromq|
   * - 🔗 **HTTP**
     - |restful|

.. |csv| image:: https://img.shields.io/badge/CSV-217346?logo=files&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/csv.html
    :alt: CSV
.. |json| image:: https://img.shields.io/badge/JSON-000000?logo=json&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/json.html
    :alt: JSON
.. |graph| image:: https://img.shields.io/badge/Graph%20(SVG)-FFB13B?logo=svg&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/graph.html
    :alt: Graph
.. |influxdb| image:: https://img.shields.io/badge/InfluxDB%201%2F2%2F3-22ADF6?logo=influxdb&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/influxdb.html
    :alt: InfluxDB
.. |prometheus| image:: https://img.shields.io/badge/Prometheus-E6522C?logo=prometheus&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/prometheus.html
    :alt: Prometheus
.. |timescaledb| image:: https://img.shields.io/badge/PostgreSQL%2FTimescaleDB-4169E1?logo=postgresql&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/timescaledb.html
    :alt: PostgreSQL/TimescaleDB
.. |graphite| image:: https://img.shields.io/badge/Graphite-5A5A5A
    :target: https://glances.readthedocs.io/en/develop/gw/graphite.html
    :alt: Graphite
.. |opentsdb| image:: https://img.shields.io/badge/OpenTSDB-4B8BBE
    :target: https://glances.readthedocs.io/en/develop/gw/opentsdb.html
    :alt: OpenTSDB
.. |statsd| image:: https://img.shields.io/badge/StatsD-6E4A7E
    :target: https://glances.readthedocs.io/en/develop/gw/statsd.html
    :alt: StatsD
.. |riemann| image:: https://img.shields.io/badge/Riemann-C0392B
    :target: https://glances.readthedocs.io/en/develop/gw/riemann.html
    :alt: Riemann
.. |elasticsearch| image:: https://img.shields.io/badge/Elasticsearch-005571?logo=elasticsearch&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/elastic.html
    :alt: Elasticsearch
.. |clickhouse| image:: https://img.shields.io/badge/ClickHouse-FFCC01?logo=clickhouse&logoColor=black
    :target: https://glances.readthedocs.io/en/develop/gw/clickhouse.html
    :alt: ClickHouse
.. |duckdb| image:: https://img.shields.io/badge/DuckDB-FFF000?logo=duckdb&logoColor=black
    :target: https://glances.readthedocs.io/en/develop/gw/duckdb.html
    :alt: DuckDB
.. |mongodb| image:: https://img.shields.io/badge/MongoDB-47A248?logo=mongodb&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/mongodb.html
    :alt: MongoDB
.. |cassandra| image:: https://img.shields.io/badge/Cassandra-1287B1?logo=apachecassandra&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/cassandra.html
    :alt: Cassandra
.. |couchdb| image:: https://img.shields.io/badge/CouchDB-E42528?logo=apachecouchdb&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/couchdb.html
    :alt: CouchDB
.. |kafka| image:: https://img.shields.io/badge/Kafka-231F20?logo=apachekafka&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/kafka.html
    :alt: Kafka
.. |rabbitmq| image:: https://img.shields.io/badge/RabbitMQ%2FActiveMQ-FF6600?logo=rabbitmq&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/rabbitmq.html
    :alt: RabbitMQ/ActiveMQ
.. |mqtt| image:: https://img.shields.io/badge/MQTT-660066?logo=mqtt&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/mqtt.html
    :alt: MQTT
.. |nats| image:: https://img.shields.io/badge/NATS-27AAE1?logo=natsdotio&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/nats.html
    :alt: NATS
.. |zeromq| image:: https://img.shields.io/badge/ZeroMQ-DF0000?logo=zeromq&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/zeromq.html
    :alt: ZeroMQ
.. |restful| image:: https://img.shields.io/badge/RESTful%20endpoint-009688?logo=fastapi&logoColor=white
    :target: https://glances.readthedocs.io/en/develop/gw/restful.html
    :alt: RESTful

Example: export stats without any interface (-q is the quiet mode), thanks to the CSV export module:

.. code-block:: console

    $ glances -q --export csv --export-csv-file /tmp/glances.csv

Advanced usage 🔧
=================

Display raw stats on stdout:

.. code-block:: console

    $ glances --stdout cpu.user,mem.used,load
    cpu.user: 30.7
    mem.used: 3278204928
    load: {'min1': 0.21, 'min5': 0.4, 'min15': 0.27, 'cpucore': 4}
    cpu.user: 3.4
    mem.used: 3275251712
    load: {'min1': 0.19, 'min5': 0.39, 'min15': 0.27, 'cpucore': 4}
    ...

or in a CSV format thanks to the stdout-csv option:

.. code-block:: console

    $ glances --stdout-csv now,cpu.user,mem.used,load
    now.iso,now.custom,cpu.user,mem.used,load.min1,load.min5,load.min15,load.cpucore
    2026-10-11T15:12:54+00:00,2026-10-11 15:12:54 UTC,7.3,5948149760,1.04,0.99,1.04,4
    2026-10-11T15:12:56+00:00,2026-10-11 15:12:56 UTC,5.4,5949136896,1.04,0.99,1.04,4
    ...

or in a JSON format thanks to the stdout-json option (one JSON object per refresh, attribute not supported in this mode):

.. code-block:: console

    $ glances --stdout-json cpu,mem
    {"cpu": {"user": 24.7, "system": 3.8, "idle": 71.4, "nice": 0.0, "iowait": 0.0, "irq": 0.0, "steal": 0.0, "guest": 0.0, "total": 29.0, "ctx_switches": 0, "interrupts": 0, "soft_interrupts": 0, "syscalls": 0, "cpucore": 4}, "mem": {"total": 7837949952, "available": 2919079936, "percent": 62.8, "used": 4918870016, "free": 2919079936, "active": 2841214976, "inactive": 3340550144, "buffers": 546799616, "cached": 3068141568, "shared": 788156416, "slab": 158588928}}
    ...

Protect the Web server with a password: generate a password hash

.. code-block:: console

    $ glances --set-password

and paste the printed value into the ``password`` key of the ``[outputs]`` section of
your ``glances.conf`` file.

Serve the REST API without the WebUI, and browse its interactive documentation
(Swagger at ``/docs``, ReDoc at ``/redoc``):

.. code-block:: console

    $ glances -s --disable-webui --api-doc

Choose what is collected and displayed:

.. code-block:: console

    $ glances --modules-list                     # list plugins and exporters
    $ glances --disable-plugin sensors,wifi      # do not collect these plugins
    $ glances -t 5                               # refresh every 5 seconds
    $ glances -f 'python.*'                      # filter the process list

Use another configuration file with ``-C <path>``, or override any key with an
environment variable ``GLANCES_<SECTION>__<KEY>=<value>`` (handy in containers),
see the `Configuration`_ documentation.

Report a bug: ``glances --issue`` tests every plugin and prints a Markdown report
to paste into the GitHub issue.

If you do not want to remember all those options, @yottajunaid has created a simple
launcher_ for Linux.

Use Glances as a Python library 📚
==================================

Every Glances plugin is available from Python, as a read-only mapping:

.. code-block:: python

    >>> from glances import api
    >>> gl = api.GlancesAPI()
    >>> gl.cpu["total"]
    6.8
    >>> gl.auto_unit(gl.mem["used"])
    '9.45G'
    >>> gl.network.keys()
    ['wlp0s20f3', 'mpqemubrzone1', 'tap-8d309783ee6']
    >>> gl.network["wlp0s20f3"]["bytes_recv"]
    101.7532271038767
    >>> [p["name"] for p in gl.top_process(limit=3)]
    ['Isolated Web Co', 'terminator', 'claude']
    >>> gl.plugins()
    ['amps', 'containers', 'core', 'cpu', 'diskio', 'folders', 'fs', 'gpu', 'ip', ...]

By default the stats are collected **on demand**, when they are read. In a notebook
or a long-running tool, let Glances collect them **in the background**, so the
history and the alerts fill up between two reads:

.. code-block:: python

    >>> import time
    >>> with api.GlancesAPI(background=True, plugins=["cpu", "mem"]) as gl:
    ...     time.sleep(60)
    ...     gl.cpu.history(nb=30)
    ...     gl.alerts()

Each plugin view also gives its fields description (``.fields``), its thresholds
(``.limits``) and its alert levels (``.levels``). The API reads ``glances.conf``
as Glances does, but never runs the configured actions nor the exporters.

The Glances 5 Python API replaces the Glances 4 one. See the `PythonApi`_
documentation for the complete reference.

Documentation 📜
================

The complete documentation is on readthedocs_:

.. list-table::
   :header-rows: 1
   :widths: 30 70

   * - Topic
     - Content
   * - 🚀 `Quickstart`_
     - First steps, modes and hotkeys
   * - ⌨️ `Command reference`_
     - All the command line options
   * - ⚙️ `Configuration`_
     - The ``glances.conf`` file
   * - 📊 `Plugins`_
     - What every plugin shows, and how to tune it
   * - 🌐 `Exports`_
     - Gateways to other services
   * - 🔌 `RestfulApi`_ / `PythonApi`_ / `McpApi`_
     - The APIs
   * - 🐳 `Docker`_
     - Run Glances in a container
   * - ❓ `FAQ`_
     - Frequently asked questions

If you have any question (after RTFM! and the `FAQ`_), please post it on the official
Reddit `forum`_ or in GitHub `Discussions`_.

Installation 🚀
===============

PyPI: pip, pipx or uv
---------------------

Glances is on ``PyPI``. Install it in a virtual environment with ``pip``:

.. code-block:: console

    python3 -m venv ~/.venv
    source ~/.venv/bin/activate
    pip install 'glances[all]'

or, as an isolated application, with `pipx`_ or `Uv`_:

.. code-block:: console

    pipx install 'glances[all]'    # installed in ~/.local/bin
    uvx glances                     # install and run in one line

To upgrade: ``pip install --upgrade glances`` (or ``pipx upgrade glances``).

``pip install glances`` (without extra) installs a minimal Glances, without the Web
interface. Pick only the features you need between the brackets, for example
``pip install 'glances[web,containers]'``:

.. list-table::
   :header-rows: 1
   :widths: 20 80

   * - Extra
     - Feature
   * - ``all``
     - All the features below
   * - ``web``
     - Web server mode (WebUI and REST API)
   * - ``mcp``
     - MCP server (AI assistant integration)
   * - ``browser``
     - Servers autodiscovery for the browser modes
   * - ``containers``
     - Docker, Podman and LXD containers
   * - ``gpu``
     - NVIDIA GPU
   * - ``sensors``
     - Battery (Linux)
   * - ``raid`` / ``smart``
     - RAID and S.M.A.R.T. plugins (Linux)
   * - ``wifi``
     - No dependency (kept for backward compatibility)
   * - ``cloud``
     - Cloud instance metadata
   * - ``action``
     - Mustache templating in the alert actions
   * - ``export`` / ``graph``
     - Export modules / SVG graph export

*Note*: `psutil`_, the main Glances dependency, is built from source when no wheel
is available for your platform. Python headers and a C compiler are then required
(``python3-dev`` and ``gcc`` on Debian/Ubuntu, ``python3-devel`` on Fedora/RHEL).

How to contribute ? 🤝
======================

If you want to contribute to the Glances project, read this `wiki`_ page.

There is also a chat dedicated to the Glances developers:

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

Project sponsorship 🙌
======================

You can help me to achieve my goals of improving this open-source project
or just say "thank you" by:

- sponsor me using one-time or monthly tier Github sponsors_ page
- send me some pieces of bitcoin: 185KN9FCix3svJYp7JQM7hRMfSKyeaJR4X

Any and all contributions are greatly appreciated.

Authors and Contributors 🔥
===========================

Glances has been created by Nicolas Hennion (@nicolargo) <nicolas@nicolargo.com>

and developed by a wonderfull contributors_ community.

License 📜
==========

Glances is distributed under the LGPL version 3 license. See ``COPYING`` for more details.

.. image:: https://github.com/nicolargo/glances/raw/refs/heads/develop/docs/_static/glances-responsive-webdesign.png
   :align: center

.. _psutil: https://github.com/giampaolo/psutil
.. _pipx: https://pipx.pypa.io/
.. _readthedocs: https://glances.readthedocs.io/en/develop/
.. _forum: https://www.reddit.com/r/glances/
.. _wiki: https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-%3F
.. _sponsors: https://github.com/sponsors/nicolargo
.. _wishlist: https://www.amazon.fr/hz/wishlist/ls/BWAAQKWFR3FI?ref_=wl_share
.. _Uv: https://docs.astral.sh/uv/getting-started/installation/
.. _Docker: https://github.com/nicolargo/glances/blob/develop/docs/docker.rst
.. _Quickstart: https://glances.readthedocs.io/en/develop/quickstart.html
.. _`Command reference`: https://glances.readthedocs.io/en/develop/cmds.html
.. _Configuration: https://glances.readthedocs.io/en/develop/config.html
.. _Plugins: https://glances.readthedocs.io/en/develop/aoa/index.html
.. _Exports: https://glances.readthedocs.io/en/develop/gw/index.html
.. _Fetch: https://glances.readthedocs.io/en/develop/fetch.html
.. _PythonApi: https://glances.readthedocs.io/en/develop/api/python.html
.. _RestfulApi: https://glances.readthedocs.io/en/develop/api/restful.html
.. _McpApi: https://glances.readthedocs.io/en/develop/api/mcp.html
.. _`MCP (Model Context Protocol)`: https://modelcontextprotocol.io
.. _FAQ: https://github.com/nicolargo/glances/blob/develop/docs/faq.rst
.. _Discussions: https://github.com/nicolargo/glances/discussions
.. _contributors: https://github.com/nicolargo/glances/graphs/contributors
.. _launcher: https://github.com/yottajunaid/glances-launcher
.. _opencode: https://opencode.ai
