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

This commit is contained in:
Hernâni Marques 2026-07-10 14:54:00 +02:00
parent 34dd0ba717
commit 9574d438cc
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}"
}