aboutsummaryrefslogtreecommitdiff
path: root/cpu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cpu.sh')
-rwxr-xr-xcpu.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu.sh b/cpu.sh
index 935d515..0487b6f 100755
--- a/cpu.sh
+++ b/cpu.sh
@@ -2,7 +2,7 @@
export JMNAME='CPU'
export JTYPE='linegraph'
function trigger {
- $CLIENT --add "$JID" $(python -c $'import psutil\nimport time\ntime.sleep(1)\nprint psutil.cpu_percent()')
+$CLIENT --add "$JID" $(python -c $'import psutil\nimport time\nprint " ".join([str(i) for i in psutil.cpu_percent(1, True)])')
}
export -f trigger
./monitor_daemon.sh