glances-rs 6819ce4e18 M4: fetch mode, cleanup and documentation
- --fetch with a Jinja-subset renderer and the shipped templates
- clippy clean, cargo fmt, all tests green
- README status and differential testing instructions
2026-10-09 23:59:26 +00:00

glances-rs

A Rust rewrite of Glances, the system monitoring tool, targeting Linux.

This project is a drop-in replacement for the standalone Glances modes:

  • curses-like terminal UI (glances)
  • stdout modes: --stdout, --stdout-csv, --stdout-json
  • --fetch (with the shipped templates), --issue, --module-list
  • the same glances.conf configuration file (limits, thresholds, aliases, show/hide lists, per-plugin refresh, history, actions)
  • compatible stats schemas and CLI flags for the implemented features

The following Python Glances features are intentionally not provided: REST API, WebUI, MCP, client/server mode, discovery/browser, SNMP and exporters.

Status

Area Status
CLI (clap, drop-in flags) done
Configuration (glances.conf) done
Plugin model (limits, views, rates, MMM, history, events, actions) done
Terminal UI (ratatui) done
stdout / CSV / JSON / fetch / issue modes done
Core plugins cpu, percpu, mem, memswap, load, fs, network, diskio, sensors, irq, system, uptime, now, core, version, psutilversion, quicklook, processcount, processlist, programlist
Extended plugins folders, amps, ports, raid, wifi, ip
Not ported yet containers, vms, gpu/npu/mpp, connections, smart, cloud
Python-specific flags --trace-malloc, --api-doc, --api-restful-doc rejected with a clear error

Build and run

$ cargo build --release
$ ./target/release/glances                 # terminal UI
$ ./target/release/glances --stdout-json cpu,mem,load
$ ./target/release/glances --fetch

Differential testing

The tools/parity.py script compares the Rust implementation with the Python reference implementation (the oracle) plugin by plugin: it runs both for a few refreshes and diffs the flattened key sets and value types.

$ python3 -m venv /tmp/opencode/glances-py
$ /tmp/opencode/glances-py/bin/pip install /path/to/python-glances
$ cargo build
$ python3 tools/parity.py            # all implemented plugins
$ python3 tools/parity.py cpu mem    # selected plugins

Workspace layout

Crate Purpose
glances-core plugin model, config, limits, history, events, filters, processes
glances-plugins collectors, plugin registry and update engine
glances-tui terminal UI (ratatui)
glances-cli the glances binary, stdout modes and fetch renderer

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

S
Description
A Rust rewrite of Glances: standalone Linux monitoring (TUI, stdout/CSV/JSON/fetch modes), drop-in glances.conf and plugin compatibility.
Readme
231 KiB
Languages
Rust 98.2%
Python 1.3%
Jinja 0.5%