Memory Monitor — monitor app
Memory Monitor is a monitor app built from LightGUI's new XFrame monitor widgets: one 1024x768 window of live memory data from /proc/meminfo, refreshed every 500 ms. No mock or seeded demo data — every number on screen is read from the running host.

Memory Monitor running under Xvfb — 30.3 GiB total, 19% used, 78% cached, no swap on hot_dallas.
What it shows
All figures are live from /proc/meminfo. "Used" follows the free convention: total − free − buffers − cached.
| Widget | What it shows |
|---|---|
| XSysBox “MEMORY” | Big used-% number, mini history graph, usage bar; the title carries the live total and available figures |
| XDonutGauge “Memory used” | Ring gauge for used %; the label under the ring shows used GiB |
| XDonutGauge “Swap used” | Ring gauge for swap % (0% on machines with no swap configured) |
| XStackBar | Used / cached / buffers / free in GiB, with legend and total; the title carries the live available figure |
| XHistoryGraph | Used % and cached % over the last 60 seconds, with current / min / max / average |
| XUsageBar x3 | Memory used, Cached, Swap used |
- XSysBox — the big-number box (title, big value, history, usage bar in one box).
- XDonutGauge — the ring gauge (value arc + centred %).
- XStackBar — the stacked used / cached / buffers / free bar.
- XHistoryGraph — the scrolling multi-series history graph.
- XUsageBar — the gradient usage bar.
Every visible UI element is a widget from the LightGUI registry — no raw X11 drawing, no native GTK calls, no hand-rolled controls. The app shell (window, event loop, 500 ms refresh timer) is the harness, not a UI element.
Build and run
The app exists in all three LightGUI languages, on branch monitor-apps/memory-monitor in each repo. Same window, same live data, same 500 ms timer in each.
# C++ (lightgui)
cd examples/monitor/memory-monitor
make
DISPLAY=:114 ./memory-monitor
# Rust (lightgui_rust)
cargo run -p xframe-demo --example monitor_memory_monitor
# Python (lightgui_python)
PYTHONPATH=. python3 examples/monitor_memory_monitor/main.py
Close the window (C and Rust also accept Esc / q) to quit. Python tests stay green: DISPLAY=:99 python3 -m unittest discover -s tests — 363 tests passed.
Source
- C++: lightgui —
examples/monitor/memory-monitor/main.cpp(+ Makefile, README, screenshot) - Rust: lightgui_rust —
crates/xframe-demo/examples/monitor_memory_monitor/main.rs - Python: lightgui_python —
examples/monitor_memory_monitor/main.py
Part of the Monitor Widgets set — the btop-style live widgets for LightGUI.