scripts/procstat-rusage
author Tomas Zeman <tomas@functionals.cz>
Thu, 15 Apr 2021 15:27:45 +0200
changeset 39 a0015fe2009a
parent 38 1eada2e65e7a
permissions -rwxr-xr-x
mysql-slave,status (Zabbix trapper)

#!/bin/sh

_PID=$1

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