From 1759c270db273939feeff5b241e9143cb067aa32 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sun, 28 Dec 2014 13:44:27 +0800 Subject: support multiline graph --- cpu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpu.sh') 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 -- cgit v1.2.3