containers: Docker (and best-effort Podman) plugin

- minimal Docker Engine API client over Unix/TCP sockets with version
  negotiation and chunked response decoding
- drop-in stats schema: active/stopped containers, CPU/memory/IO/network
  rates, ports, uptime (pretty_date), image, engine field
- Docker + Podman engines, config (all, podman_sock, max_name_size,
  disable_stats, show/hide, per-container thresholds)
- export strips the computation sub-dicts (--stdout/--stdout-csv)
- TUI block above the process count
- CI-safe fake Docker socket test + live differential parity
This commit is contained in:
glances-rs
2026-10-10 00:24:39 +00:00
parent a522d21b0b
commit ea9debf71b
13 changed files with 2036 additions and 6 deletions
+5 -2
View File
@@ -159,12 +159,15 @@ def main():
plugins = args.plugins or DEFAULT_PLUGINS
errors = []
for plugin in plugins:
# The containers plugin needs a couple of refreshes for its rates to
# become available (both implementations warm up their second sample).
iterations = max(args.iterations, 6) if plugin == "containers" else args.iterations
extra = ["-C", args.config] if args.config else []
rust, rust_error = run(args.rust, [plugin], args.iterations, extra)
rust, rust_error = run(args.rust, [plugin], iterations, extra)
if rust_error is not None:
errors.append(f"{plugin}: Rust run failed: {rust_error}")
continue
python, python_error = run_python(args.python, args.config, [plugin], args.iterations, [])
python, python_error = run_python(args.python, args.config, [plugin], iterations, [])
if python_error is not None:
errors.append(f"{plugin}: Python run failed: {python_error}")
continue