client.sh: run 'free' command in english to allow parsing its output

Change-Id: I2aa2d5733f52b4ed8abf9d619bca733fbabb5389
This commit is contained in:
Christoph Borchert
2015-06-16 12:28:15 +02:00
parent 9424a2ead7
commit eaf4e1f510

View File

@ -43,7 +43,7 @@ do
fi fi
# only start a client if at least 500 MiB is available # only start a client if at least 500 MiB is available
FREE_MEM=$(free -m | grep "buffers/cache:" | awk '{print $4}') FREE_MEM=$(LC_ALL=C free -m | grep "buffers/cache:" | awk '{print $4}')
if [ $FREE_MEM -lt "500" ]; then if [ $FREE_MEM -lt "500" ]; then
# waiting for free memory. sleep 1-60s and retry. # waiting for free memory. sleep 1-60s and retry.
sleep $(($RANDOM / (32768 / 60) + 1)) sleep $(($RANDOM / (32768 / 60) + 1))