aboutsummaryrefslogtreecommitdiff
path: root/cpu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cpu.sh')
-rwxr-xr-xcpu.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpu.sh b/cpu.sh
new file mode 100755
index 0000000..935d515
--- /dev/null
+++ b/cpu.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+export JMNAME='CPU'
+export JTYPE='linegraph'
+function trigger {
+ $CLIENT --add "$JID" $(python -c $'import psutil\nimport time\ntime.sleep(1)\nprint psutil.cpu_percent()')
+}
+export -f trigger
+./monitor_daemon.sh