# glances-rs A Rust rewrite of [Glances](https://github.com/nicolargo/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, containers (Docker) | | Not ported yet | vms, gpu/npu/mpp, connections, smart, cloud, LXD containers | | Python-specific flags | `--trace-malloc`, `--api-doc`, `--api-restful-doc` rejected with a clear error | ## Build and run ```console $ 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. ```console $ 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 ``` The containers plugin is compared against a live Docker daemon. Install the Python extras (`pip install docker python-dateutil requests`) and have a running container; the harness gives the plugin six refreshes because both implementations need a warm-up sample before their rates are available. Use a config with `[containers] all=True` to also compare stopped containers. ## 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](LICENSE-APACHE) or [MIT license](LICENSE-MIT) at your option.