From c2c212e48ab63f65add3731b2643544b2ff742cd Mon Sep 17 00:00:00 2001 From: Dmitri Pisarenko Date: Thu, 25 Dec 2014 23:02:37 +0300 Subject: [PATCH] Attempt at fixing issue #576. --- src/main/resources/com/rultor/agents/req/_head.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/com/rultor/agents/req/_head.sh b/src/main/resources/com/rultor/agents/req/_head.sh index d356d2198e..2bb9d5c5ce 100644 --- a/src/main/resources/com/rultor/agents/req/_head.sh +++ b/src/main/resources/com/rultor/agents/req/_head.sh @@ -68,7 +68,7 @@ echo "${scripts[@]}" >> script.sh function docker_when_possible { while true; do - load=$(uptime | awk '{print $12}' | cut -d ',' -f 1) + load=$(uptime | sed 's/ /\n/g' | tail -n 1) if [ `echo $load \> 30 | bc` -eq 1 ]; then echo "load average is ${load}, too high to run a new Docker container" echo "I will try again in 15 seconds"