aboutsummaryrefslogtreecommitdiff
path: root/examples/cpu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cpu.sh')
-rwxr-xr-xexamples/cpu.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/cpu.sh b/examples/cpu.sh
new file mode 100755
index 0000000..0487b6f
--- /dev/null
+++ b/examples/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\nprint " ".join([str(i) for i in psutil.cpu_percent(1, True)])')
+}
+export -f trigger
+./monitor_daemon.sh