From e3744a09f9e5fd530335d99f273fd0af5f20c352 Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Mon, 4 Feb 2013 14:30:11 +0100 Subject: [PATCH] multicpu1sec: add a flush to awk --- plugins/system/multicpu1sec/multicpu1sec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/system/multicpu1sec/multicpu1sec b/plugins/system/multicpu1sec/multicpu1sec index 92fa98cf..c98dfa2b 100644 --- a/plugins/system/multicpu1sec/multicpu1sec +++ b/plugins/system/multicpu1sec/multicpu1sec @@ -26,7 +26,7 @@ run_watchdog() { # should also trap kill and term signals run_acquire() { echo "$$" > $pidfile mpstat -P ALL $interval | - awk -v cpus=$cpus '$2>=0&&$2<10 {print $2, systime(), (100-$11)/cpus}' >> $cache + awk -v cpus=$cpus '$2>=0&&$2<10 {print $2, systime(), (100-$11)/cpus; system("");}' >> $cache rm -f $pidfile $cache }