develop 分支是 5.0.0 beta,API 与 4.x 不兼容,不要用于生产;Web 服务器默认只监听 127.0.0.1:61208,远程访问需加 -B 0.0.0.0;REST API 默认无密码保护,需用 glances --set-password 生成哈希写入配置。
glances
nicolargo活跃维护跨平台的系统监控工具,可看作 top/htop 的增强替代品,在终端或网页中实时查看 CPU、内存、磁盘、网络等资源占用。
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, macOS and Windows operating systems.
pip install glancesREADME 未说明具体硬件要求;支持 GNU/Linux、BSD、macOS 和 Windows,可监控 GPU、NPU 等设备,但未列出厂商或型号。
跨平台系统监控工具,用终端或浏览器实时查看 CPU、内存、磁盘、网络、GPU 与进程
跨平台的系统监控工具,可看作 top/htop 的增强替代品,在终端或网页中实时查看 CPU、内存、磁盘、网络等资源占用。
核心能力
- 终端 TUI 仪表盘实时展示 CPU、内存、负载、磁盘、网络、传感器与进程
- 内置 WebUI 与 REST API,支持客户端/服务器远程监控
- 支持 Docker、Podman、LXD 容器与 libvirt 等虚拟机监控
- 可将指标导出到 CSV、文件或时序数据库,并支持 stdout 输出
- 内置 MCP 服务器,供 Claude、Cursor 等 AI 助手直接查询系统状态
容易踩的坑
- v4.5.9Glances 4.5.9最新正式版2026-11-07 · 2026-11-07 17:06 UTC
Cyber:
- Replace python-jose (with CVE) by PyJWT
- Update all dependencies
This version will be the last one for Glances 4.x.
You can test Glances 5.0.0 beta with:
python3 -m venv ~/.venv-glances5 source ~/.venv-glances5/bin/activate pip install --pre --index-url https://test.pypi.org/simple/ \ --extra-index-url https://pypi.org/simple/ 'glances[web]>=5.0.0b1' glances --versionOr run the nicolargo/glances:dev Docker image (built from this branch).
- v4.5.8Glances 4.5.82026-10-11 · 2026-10-11 19:18 UTC
查看更新说明
Bugs corrected:
- Stdout: CSV data blocks use the first list item's fields instead of each item's own #3746
- Stdout: raw selector with a dotted item key (network.eth0.100.bytes_recv) raises UnboundLocalError #3748
- Folders: a second configured FolderList appends its entries to the first instance #3750
- JSON export: --stop-after leaves an empty file, the last sample is lost on shutdown #3752
- DuckDB export turns the string 'False' into TRUE #3754
- InfluxDB export truncates dotted list item identifiers (VLAN interfaces lose their tags) #3756
- IP plugin: a non-object public IP response raises AttributeError in the main thread #3758
- CSV export: rows are shifted under another device's column when the field order changes #3760
- Export: exporters mutate the live plugin statistics when merging limits #3766
- Elasticsearch export: a mapping type per plugin is rejected by ES 6/7/8+, only the first plugin is stored #3780
- Exports: an optional key missing from the config overwrote the module default with None #3781
- MQTT export: crash at startup when port or callback_api_version is omitted #3777
- Uptime: export the SNMP uptime instead of the local one #3779
- Cloud: do not report a platform whose metadata API returns nothing (OpenStack reported on Amazon EC2) #3778
- IRQ: divide the interrupt count by the refresh time (Rate/s was multiplied by the refresh time) #3771
- Programs: KeyError when a process stat is listed in [processlist] disable_stats #3776
- Containers: WebUI throws on a restarting container whose cpu/mem stats are empty #3768
- WebUI: the browser caches glances.js heuristically, revalidate the static files #3763
- Processes: io_old keeps one entry per pid ever seen (slow memory leak on hosts spawning short-lived processes)
- Smart: a missing smartctl (pySMART >= 1.4) crashes the server at startup
Enhancements:
- WebUI: make the container table sortable by status #3763
- Processlist: only build curses rows for the processes that fit on screen (performance) #3762
Continuous integration and documentation:
- Mark regression test assertions for Bandit
Thanks to all the contributors for this version: Luis Figueroa, Param Tanna, Iain, Juice-de-Orange, xu91102, Artem Lytkin and Hassan Rady.
- v4.5.7Glances 4.5.72026-09-26 · 2026-09-26 13:30 UTC
查看更新说明
Bugs corrected:
- processcount pid_max always 0, and status comparison uses
isinstead of==#3637 - mcp extra allows mcp 2.0.0 which breaks --enable-mcp (No module named 'mcp.server.fastmcp') #3640
- TypeError: string indices must be integers, not 'str' in smart plugin during _add_device_stats #3704
- InfluxDB3 exports failing with 'Cannot export percpu stats to InfluxDB' ('time_precision') #3734
- TimescaleDB export does not recover from failed transactions #3743
- Guard cursor navigation in client/server mode #3221
- Raw backspace (DEL) not handled in curses textboxes #1644
- Init containers, vms and smart stats as a list #3582
- Compare stats to the init value, not to the bound method #3665
- Set disable_ for additional plugins so is_enabled() works for them #3736
- Read a False config switch as False in get_conf_value #3729
- Strip whitespace around comma-separated config values #3700
- Let --disable-separator and --disable-bg override glances.conf #3730
- Read web_x_ssl_verify as a boolean, not as a CA bundle path #3731
- Replace the focus filter list on set instead of extending it #3728
- Keep the whole filter regex when it contains a colon #3674
- Read a missing sort value as zero instead of discarding the sort #3693
- Fix return value in timeout permission fallback #3723
- Initialise a rate stat that is new since the previous sample #3721
- Keep hide_zero hiding a stat that never moves #3725
- IP plugin: prefer the default-route address over interface order #3465
- AMD GPU name resolution when the card is only listed in amdgpu.ids #3664
- Containers: aggregate network stats over all container interfaces #3669
- Containers: stop repeating a title fragment when several engines run #3678
- Connections: count terminated connection states instead of counting initiated twice #3646
- Connections: alert on the tracked percentage, not on 0 #3683
- Connections: remember that a probe was disabled #3732
- Disk I/O: alert on the bitrate, and decorate the field the WebUI reads #3684
- Folders: honour folder_N_refresh instead of walking every cycle #3676
- Network: use the TX alert for bytes_sent_rate_per_sec decoration #3660
- Network: a rate of 0 in one direction must not mute the other #3694
- Network: read the hide_threshold_bytes the plugin documents #3726
- NPU: alert on the temperature both interfaces already ask for #3718
- Per-CPU: report the guest nice CPU value #3685
- Per-CPU: summarize the cores that are not displayed, not the ones that are #3687
- Ports: send the ICMP timeout in the unit each ping expects #3677
- Ports: scope the TCP scan timeout to the scanning socket #3701
- Processlist: show Windows priority classes as labels in the NI column #3672
- Processlist: index io_counters instead of testing membership in it #3675
- Programs: keep zero-valued fields when aggregating processes into programs #3648
- Programs: sum a program's io_counters instead of concatenating them #3692
- Quicklook: colour each --percpu bar by that core's own load #3716
- Quicklook: keep a history for gpu_mem and gpu_proc #3744
- Sensors: alert on a reading of 0 instead of skipping it #3688
- Sensors: stop reconnecting to hddtemp on every refresh and read the [hddtemp] section again #3745
- VMs: colour the columns msg_curse already asks decorations for #3722
- Wifi: honour a partially configured set of signal thresholds #3691
- WebUI: show ? for a process whose nice value the OS will not report #3681
- WebUI: match the RAID alert to raid_alert instead of a bare comparison #3690
- WebUI: read the ports status as the API sends it, and use the web alert #3695
- WebUI: match the AMP alert to the plugin's get_alert #3696
- WebUI: match the VM status colour to the plugin's vm_alert #3697
- WebUI: colour the per-CPU iowait cell by iowait, not system #3698
- WebUI: colour the process MEM% cell by memory_percent, not cpu_percent #3699
- WebUI: colour each DISK I/O column by the dire
- processcount pid_max always 0, and status comparison uses
- v4.5.6Glances 4.5.62026-08-01 · 2026-08-01 09:09 UTC
查看更新说明
Bugs corrected:
- Alert level decided by dict ordering: a failing+slow URL is downgraded to WARNING, an unscanned URL reports CRITICAL #3632
- GPU plugin duplicates card name and omits N/A for unavailable metrics in multi-GPU #3631
- GPU plugin duplicates the utilisation value and paints it with the memory colour in multi-GPU #3630
- IP plugin displays wrong interface: outer loop in get_ip_address() never breaks #3617
- VideoCore (v3d) memory shows ~93% on Raspberry Pi 5 with gpu_mem=4M — misleading denominator from drm-total-memory #3611
- CSV export: --stdout-csv data rows desync from header when network interfaces change count at runtime #3606
- Glances Network plugin with mismatched schema not logging in TimescaleDB export #3592
Security patches:
- as_dict_secure() Value-Level Bypass Leaks Credentials in URL Values via /api/4/config - CVE-2026-68520
- --disable-config-exec does not cover on-alert action commands - CVE-2026-68519
- Command injection bypass of action-template sanitizer via cross-field shell-operator reconstruction - CVE-2026-68518
- Incomplete fix of CVE-2026-32608: action-template sanitizer is bypassed by nested stat values - CVE-2026-62982
- REST API CORS Credentials Guard Uses Exact-Match Instead of Membership Test - CVE-2026-68517
Thanks to all the contributors for this version: yogendrarau, Gabriel Changamire, Sanjay Santhanam, William Wu, Martin Ďurana and Noa Levi.
- v4.5.5Glances 4.5.52026-06-13 · 2026-06-13 14:23 UTC
查看更新说明
Bugs corrected:
- /api/4/containers stays ~4-5s with ~60 Docker containers #3559
- Crash when using --sparkline #3547
- VMs section does not show LOAD 1/5/15min values #3535
- Fix AMD GPU detection for multi-digit DRM card numbers #3578
- Keep auto_unit within limits, so columns stay aligned #3558
- Rest status check shouldn't require auth #3544
- Logging configuration to use boolean value #3536
- Fix filesystem aliases for mixed-case mount points #3532
- Regression in Disk I/O reporting #3546
Enhancements:
- Add meter for CPU and MEM of GPU in the Quicklook plugin #1711
- Add cpu limit to docker, podman and lxd containers #3557
- GPU Monitoring (ARM / RaspberryPi) #1048
- GPU plugin: display proc and temperature on NVIDIA Jetson (Tegra) integrated #3580
Security patches:
- Arbitrary file write and command execution in AMP command configuration - Correct CVE-2026-53925
- XML-RPC Server Missing Host Header Validation Enables DNS Rebinding Attack - Correct CVE-2026-46611
- XML-RPC Multi-Origin CORS Configuration Silently Falls Back to Wildcard - Correct CVE-2026-46608
- Insecure Pickle Deserialization in Version Cache Leads to Arbitrary Code Execution - Correct CVE-2026-46607
- Command Injection via KVM/QEMU VM Domain Names in virsh.py - Correct CVE-2026-46606
Continious integration, refactoring and documentation:
- Add top 10 slowest plugins summary at end of --issue output #3572
- Update documentation for hide/show #3546
- Refactor: Improve load_additional_plugins Maintainability, Safety, and Plugin Discovery #3561
- Refactor: Reduce Cyclomatic complexity of __display_top Issue #3549
- Refactor: Reduce Cyclomatic complexity of display_popup() #3542
- Refactor: Compute spacing
- Refactor: handle quicklook required for display²
- Refactor: Get plugin Width & get stats summary
- Add unit test to containers/docker plugin
Packaging:
- Glances Alpine Docker images are now based on Alpine 3.24
- Glances Ubuntu Docker images are now based on Ubuntu 26.04
Thanks to all the contributors for this version: 20086080, cswaltzinger, Sergio LIVI, Adi, Ariel Eli, Gabriel St. Angel, Jack Harper, Tarrailt, William Wu, Yan and lawrence3699.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
.. raw:: html
.. raw:: html
An Eye on your System
| |pypi| |test| |contributors| |codacity| |quality| | |starts| |docker| |pypistat| |sponsors| | |reddit|
.. |pypi| image:: https://img.shields.io/pypi/v/glances.svg :target: https://pypi.python.org/pypi/Glances
.. |starts| image:: https://img.shields.io/github/stars/nicolargo/glances.svg :target: https://github.com/nicolargo/glances/ :alt: Github stars
.. |docker| image:: https://img.shields.io/docker/pulls/nicolargo/glances :target: https://hub.docker.com/r/nicolargo/glances/ :alt: Docker pull
.. |pypistat| image:: https://pepy.tech/badge/glances/month :target: https://clickpy.clickhouse.com/dashboard/glances :alt: Pypi downloads
.. |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)
.. |contributors| 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: Contributors
.. |codacity| image:: https://app.codacy.com/project/badge/Grade/40708882575f4cb3943565889de2ed6e :target: https://app.codacy.com/gh/nicolargo/glances/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade :alt: Codacity
.. |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
.. |sponsors| image:: https://img.shields.io/github/sponsors/nicolargo :target: https://github.com/sponsors/nicolargo :alt: Sponsors
.. |twitter| image:: https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white :target: https://twitter.com/nicolargo :alt: @nicolargo
.. |reddit| image:: https://img.shields.io/badge/Reddit-FF4500?style=for-the-badge&logo=reddit&logoColor=white :target: https://www.reddit.com/r/glances/ :alt: @reddit
.. raw:: html
.. important::
**The current stable release is Glances 4.5.9**: see the `v4.5.9 <https://github.com/nicolargo/glances/tree/v4.5.9>`__ tag for its
source code and documentation. ``pip install glances`` installs it.
**This branch (develop) contains Glances 5.0.0, currently in beta.**
The rest of this page describes Glances 5.
.. warning::
**Try Glances 5 (beta)** — for testing only:
- it is a **beta**: expect bugs, and **do not use it in production**;
- the **API is broken compared to Glances 4**: the REST API moves from ``/api/4``
to ``/api/5``, the Python API is new, and a Glances 5 client only talks to a
Glances 5 server (no XML-RPC anymore);
- configuration files from Glances 4 are read, but some options changed.
Install the beta from TestPyPI in a dedicated virtual environment
(dependencies still come from PyPI):
.. code-block:: console
python3 -m venv ~/.venv-glances5
source ~/.venv-glances5/bin/activate
pip install --pre --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ 'glances[web]>=5.0.0b1'
glances --version
Or run the ``nicolargo/glances:dev`` Docker image (built from this branch).
Please report what you find in the GitHub `issues <https://github.com/nicolargo/glances/issues>`__.
Summary 🌟
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.
- TUI (standalone mode)
Monitor the local machine in your terminal:
.. code-block:: console
$ glances
.. image:: ./docs/_static/glances-summary.png
Press h in the interface to display the hotkeys.
- 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:: ./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.
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.
- 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:: ./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.
- 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:: ./docs/_static/browser.png
- WebUI browser
The same servers list, served in a Web page at http://<ip>:61208/browser:
.. code-block:: console
$ glances -s --browser
.. image:: ./docs/_static/screenshot-webui-browser.png
- 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:: ./docs/_static/screenshot-mcp-opencode.png
See the McpApi_ documentation for client configuration and usage.
- Fetch mode
Get (and share) a quick look of a machine, then exit:
.. code-block:: console
$ glances --fetch
.. image:: ./docs/_static/screenshot-fetch.png
The output can be customized with a Jinja template (--fetch-template),
see the Fetch_ documentation.
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}}
...
Export stats without any interface, thanks to the quiet mode:
.. code-block:: console
$ glances -q --export csv --export-csv-file /tmp/glances.csv
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.conffile
- ⚙️
-
- 📊
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_.
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
Installation 🚀
The methods below install the latest stable release (Glances 4.5.8 today). To test Glances 5, see the beta box at the top of this page.
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/wifi- RAID, S.M.A.R.T. and Wifi plugins (Linux)
-
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).
Docker: the cloudy way
Glances Docker images are available. You can use it to monitor your server and all your containers !
The following tags are available:
- 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 (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 (FastAPI and Docker)
- ubuntu-dev for a basic Ubuntu Glances image (based on development branch) with all dependencies (Warning: may be instable)
- and -full (for example 5.0.0b1-full), and their ubuntu- variants, for a given release
A pre-release (beta or release candidate) is only published under its version tags: it never moves the latest tags.
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 -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).
This file sets bind_address=0.0.0.0 in the [outputs] section, so that the Web server mode
is reachable from outside the container. On a shared network, also set [outputs] password
and webui_allowed_hosts (see the configuration documentation). Mounting the Docker socket
:ro protects the file, not the Docker API: the container can still drive the daemon.
Additionally, if you want to use your own glances.conf file, you can create your own Dockerfile:
.. code-block:: console
FROM nicolargo/glances:latest
COPY glances.conf /root/.config/glances/glances.conf
CMD python -m glances -C /root/.config/glances/glances.conf $GLANCES_OPT
Alternatively, you can specify something along the same lines with
docker run options (notice the GLANCES_OPT environment
variable setting parameters for the glances startup command):
.. code-block:: console
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 $HOME/.config/glances/glances.conf is a local directory containing your glances.conf file.
With -C, only the given file is read: set bind_address=0.0.0.0 in its [outputs] section
(or add -B 0.0.0.0 to GLANCES_OPT) to use the Web server mode.
Run the container in Web server mode (and MCP server):
.. code-block:: console
docker run -d --restart="always" -p 61208:61208 -e TZ="${TZ}" -e GLANCES_OPT="-w --enable-mcp" -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.
Docker compose: Yet Another Cloudy Way
It is also possible to use a simple Docker compose file to:
- run the Web (Rest API and WebUI) and the MCP server (see in ./docker-compose/docker-compose.yml):
.. code-block:: console
mkdir -p ~/glances-compose
cd ~/glances-compose
wget https://raw.githubusercontent.com/nicolargo/glances/refs/heads/develop/docker-compose/docker-compose.yml
wget https://raw.githubusercontent.com/nicolargo/glances/refs/heads/develop/docker-compose/glances.conf
docker compose up
- or run the terminal client (TUI):
.. code-block:: console
mkdir -p ~/glances-compose
cd ~/glances-compose
wget https://raw.githubusercontent.com/nicolargo/glances/refs/heads/develop/docker-compose/docker-compose-tui.yml
wget https://raw.githubusercontent.com/nicolargo/glances/refs/heads/develop/docker-compose/glances.conf
docker compose -f ./docker-compose-tui.yml run glances
Shell tab completion 🔍
Glances includes shell tab autocompletion thanks to the --print-completion option.
For example, on a Linux operating system with bash shell:
.. code-block:: console
$ mkdir -p ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion
$ glances --print-completion bash > ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion/glances
$ source ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion/glances
Following shells are supported: bash, zsh, tcsh, fish and powershell.
Requirements 🧩
Glances 5 requires Python 3.10 or higher (tested up to Python 3.14) and runs on Linux, macOS, FreeBSD and Windows.
Core dependencies (always installed):
psutil(system stats, better with the latest version)requests(client mode, Ports and Cloud plugins, RESTful export module)jinja2(fetch mode and templating)shtab(shell autocompletion) [All but Windows]windows-curses(curses implementation) [Windows only]
Optional dependencies, by extra (see the [project.optional-dependencies] section
of pyproject.toml for the exact versions):
.. list-table:: :header-rows: 1 :widths: 20 80
-
- Extra
- Dependencies
-
webfastapi,uvicorn,starlette,python-jose,msgpack
-
mcpmcp
-
browserzeroconf
-
containersdocker,podman,pylxd(andpackaging,python-dateutil,six)
-
gpunvidia-ml-py
-
sensorsbatinfo[Linux only]
-
raidpymdstat[Linux only]
-
smartpySMART[Linux only]
-
wifiwifi[Linux only]
-
cloudrequests
-
actionchevron
-
graphpygal
-
exportbernhard,clickhouse-connect,elasticsearch,graphitesender,ibmcloudant,influxdb,influxdb-client,influxdb3-python,kafka-python,nats-py,paho-mqtt,pika,potsdb,prometheus_client,psycopg[binary],pymongo,pyzmq,statsd,pycouchdb
Note: the export extra installs the libraries of all the export modules. If you
only use one or a few exports, prefer to install only the library of the wanted export
(for example pip install glances influxdb-client for InfluxDB 2).
duckdb (DuckDB export module) is not included in any extra, install it manually if needed.
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) [email protected]
and developed by a wonderfull contributors_ community.
License 📜
Glances is distributed under the LGPL version 3 license. See COPYING for more details.
.. raw:: html
.. image:: ./docs/_static/glances-responsive-webdesign.png
.. raw:: html
.. _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