it's just a simple #!/bin/ash script, so nothing to write home about.
It gets the ping time to local server, and times downloading a file using wget.
It's only accurate to the second, so it has its drawbacks.
here's a summary:
#Get Pingtime
PINGTIME="$(ping -c $PINGCOUNT $PINGHOST | awk -F/ '/^round/ { print $4 }')"
#Start Timer
EPOCH_START=$(date +%s)
#Get File
wget $FILEURL -O wget.tmp --timeout=$WGET_TIMEOUT
#Stop Timer
EPOCH_FINISH=$(date +%s)
#Calculate download time (seconds)
DOWNLOAD_TIME=$(($EPOCH_FINISH-$EPOCH_START))
The rest of the script is just messing about with variables and appending to a logfile...
As you can see from the data it produces http://i.imgur.com/VXTjJ6e.jpg it proves the point clearly that there's an issue with my local exchange during "peak times" i.e. 4pm to 2am 7 days a week.
Rev.