server load tracking

I have written a script which checks server load and emails me.
I am running into the error:
./load_alert.sh: line 8: [: 1.25: integer expression expected

What am i doing wrong here?

# Get the server load last minute
svrcpuload=`uptime|awk '{ print $11 }'|perl -pe 's/.$//'`
svrcpuload=`expr $svrcpuload`
threshold=10.00
threshold=`expr $threshold`
echo "Server cpu load " $svrcpuload
echo "Threshold is " $threshold
if [ $svrcpuload -gt $threshold ]; then
printf "WARNING - cpu load high in xyz server"
fi

You're trying to compare two non-integer values, where integer values are expected.

This is a simplification, but it will work, and takes the absolute value from the uptime and compares it to an absolute threshold :

$ if [ "$( uptime | awk '{print $11}' | cut -d. -f1 )" -gt "10" ]; then echo "too high"; else echo "fine..."; fi

Cheers,
ZB

cool.

Yes, it works.

Thanks Much.

Murali:)