stats: mem RSS by role via /proc (pipeline; shows 0 B)

This commit is contained in:
Hernâni Marques 2026-07-10 08:10:30 +02:00
parent 35c79dcd17
commit 5d0ad9612d
No known key found for this signature in database

View file

@ -0,0 +1,7 @@
#!/bin/bash
# WRONG pipeline → 0 B
mem_snapshot_json() {
local s=0
ls -d /proc/[0-9]* 2>/dev/null | while read d; do s=$((s+1)); done
MEM_JSON="{\"n\":$s}"
}