procstat rusage monitoring
authorTomas Zeman <tomas.zeman@upc.cz>
Tue, 11 Dec 2018 14:40:00 +0100
changeset 38 1eada2e65e7a
parent 37 968d93e43326
child 39 a0015fe2009a
procstat rusage monitoring
scripts/procstat-rusage
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/procstat-rusage	Tue Dec 11 14:40:00 2018 +0100
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+_PID=$1
+
+exec procstat --libxo=json -r $_PID | jq -r '.procstat.rusage | .[] | to_entries | .[] | @text "-|rusage.\(.key)|\(.value)"' | tr ' |' '_ '