#!/bin/bash
for input in $(cat status_cpu.txt)
do
cpu=`ssh -i root@$input 'top -b -n1' | grep "load" | awk '{print }'`
max=2.02
if [ $(echo "$cpu < $max" | bc -l ) ]; then
echo "yes"
else
echo "no"
fi
done
#!/bin/bash
for input in $(cat status_cpu.txt)