1.3 KiB
1.3 KiB
System Overview — monitor app
A system overview in one 1024x768 window, in the btop style: four
XSysBox composite boxes (CPU / MEM / NET / DISK), one XLoadBadge
(live load averages + uptime), two XDonutGauges (CPU, Disk) and three
XUsageBars (Memory, Disk, Network). All values are read live from
/proc (stat, meminfo, net/dev, loadavg, uptime) and
statvfs("/"), refreshed every 500 ms. No seeded demo data is shown:
the SysBox history graphs are flushed with live ticks before the
screenshot is taken (60 samples at 500 ms ≈ 30 s of run time).
Window title: System Overview - monitor.
Widgets used
XSysBox× 4 — CPU, MEM, NET (KB/s), DISK /XLoadBadge× 1 — 1 / 5 / 15 min load averages + uptimeXDonutGauge× 2 — CPU, Disk /XUsageBar× 3 — Memory, Disk /, Network KB/s
Build and run
make # builds ./system-overview
./system-overview # needs an X display; Esc / q / window-close quits
Source
- C:
examples/monitor/system-overview/main.cppin https://github.com/cnmcdee/lightgui - Rust:
crates/xframe-demo/examples/monitor_system_overview.rsin https://github.com/cnmcdee/lightgui_rust - Python:
examples/monitor_system_overview/main.pyin https://github.com/cnmcdee/lightgui_python
Walkthrough: https://www.lightgui.com/monitor-system-overview/