XCoreGrid + XArcGauge + XHistoryGraph + XLoadBadge + XUsageBar in one 1024x768 window, live /proc/stat + /proc/loadavg sampled every 500 ms. Seeded demo histories are primed out with the first live sample.
CPU Dashboard — monitor (C)
A btop-style CPU dashboard in one 1024x768 window, built only from LightGUI XFrame monitor widgets:
- XCoreGrid — per-core mini history graphs (8 cores on hot_dallas)
- XArcGauge — big total-CPU % gauge (warn 70%, crit 90%)
- XHistoryGraph — total CPU % over the last 60 s
- XLoadBadge — load average 1/5/15 min + uptime
- XUsageBar — total CPU % bar
Live data comes from /proc/stat (per-core busy %) and
/proc/loadavg (via the badge's own refresh()), sampled every
500 ms. The seeded demo data each widget preloads is scrolled out at
startup by priming the histories with the first live sample.
Build
make
Run
./cpu-dashboard
Esc, q, or closing the window quits.
Source
- App:
examples/monitor/cpu-dashboard/main.cpp - Widgets:
widgets/components/XCoreGrid,XArcGauge,XHistoryGraph,XLoadBadge,XUsageBar - Repo: https://github.com/cnmcdee/lightgui