scripts/procstat-rusage
author Tomas Zeman <tomas.zeman@upc.cz>
Tue, 11 Dec 2018 14:40:00 +0100
changeset 38 1eada2e65e7a
permissions -rwxr-xr-x
procstat rusage monitoring

#!/bin/sh

_PID=$1

exec procstat --libxo=json -r $_PID | jq -r '.procstat.rusage | .[] | to_entries | .[] | @text "-|rusage.\(.key)|\(.value)"' | tr ' |' '_ '