aboutsummaryrefslogtreecommitdiff
path: root/cpu.sh
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2014-12-28 13:44:27 +0800
committerDeterminant <ted.sybil@gmail.com>2014-12-28 13:44:27 +0800
commit1759c270db273939feeff5b241e9143cb067aa32 (patch)
tree0fcdf9aaddffff95e8853412c8d0dfb695b9c8fe /cpu.sh
parent64bee3cc1884d74887b3d02af996cd435cfbc5dc (diff)
support multiline graph
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