stats: mem RSS by role via /proc (pipeline; shows 0 B)
This commit is contained in:
parent
35c79dcd17
commit
5d0ad9612d
1 changed files with 7 additions and 0 deletions
7
scripts/taler-shared/mem-snapshot.sh
Normal file
7
scripts/taler-shared/mem-snapshot.sh
Normal 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}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue