From 79d6cf8219a9f172fd60d04896588aecb1bf7e60 Mon Sep 17 00:00:00 2001 From: jedarden Date: Sun, 7 Jun 2026 10:22:05 -0400 Subject: [PATCH] docs(bf-53q6): note that feature was already complete --- notes/bf-53q6.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 notes/bf-53q6.md diff --git a/notes/bf-53q6.md b/notes/bf-53q6.md new file mode 100644 index 0000000..50546db --- /dev/null +++ b/notes/bf-53q6.md @@ -0,0 +1,53 @@ +# bf-53q6: System Cgroup Memory Panel - Already Complete + +## Task +Add system cgroup memory panel to web dashboard (real-time utilization + OOM event counter) + +## Status +**ALREADY COMPLETE** - This bead was implemented in prior commits. + +## Implementation Details + +### Backend (src/systemCgroupMonitor.ts + src/web/server.ts) +- `systemCgroupMonitor.ts` reads cgroup memory stats from `/sys/fs/cgroup/user.slice/user-1001.slice/` + - memory.current (usage) + - memory.high (soft limit) + - memory.max (hard limit) + - memory.events (oom_kill counter) + - memory.swap.current (swap usage) +- Background sampler runs every 10s, maintaining 30-sample history (5 minutes) +- API endpoints: + - `GET /api/system/memory` - current status + - `GET /api/system/memory/history` - sparkline data + - `GET /api/system/memory/summary` - formatted summary + +### Frontend Components +- `SystemMemoryIndicator.tsx` (7.5KB) + - Compact progress bar (green <70%, yellow 70-90%, red >90%) + - 5-minute sparkline (30 bars, sampled every 10s) + - OOM kill counter badge + - Swap indicator + - Updates every 10s via polling + +- `SystemMemoryPanel.tsx` (23KB) + - Full detail modal with all cgroup stats + - System memory section (total, available) + - Swap section (total, free, used bar) + - FABRIC process RSS + - OOM risk legend + - Refresh button + +### Integration (App.tsx) +- SystemMemoryIndicator in fleet header (line 928) +- SystemMemoryPanel as modal (lines 1122-1125) +- Toggle button in header (lines 872-877) + +## Related Commits +- `81b57e6` refactor(bf-53q6): add SystemMemoryIndicator to fleet header and clean up cgroup monitor +- `83baf06` feat(bf-53q6): integrate SystemMemoryPanel into FABRIC web dashboard +- `820e509` feat(bf-53q6): integrate SystemMemoryPanel into FABRIC web dashboard + +## Verification +- ✅ Web build successful (`npm run build:web`) +- ✅ Type check passes (`tsc --noEmit`, excluding unrelated OTLP test errors) +- ✅ All files committed and pushed