| Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
Doug wrote:
> What software do you like to use to measure download speeds?
wget. I have a cron job that runs the below script periodically, and a
logwatch filter that summarizes the min/average/max. It works by pulling
a file from some ISP that has made said file available specifically for
bandwidth testing. This obviously tests only download and is limited in
accuracy due to only downloading from one server.
-Tom
#!/bin/sh
LOG='/srv/log/monitor-bandwidth.log'
TEST_FILE='http://insanepwning.net/speedtest/7MB'
REPORT='/tmp/bandwidth-report'
DATE=`date '+%F %X'`
wget --output-document=/dev/null --tries=3 $TEST_FILE > $REPORT 2>&1
RATE=`perl -ne 'm/\((\d+.\d+ KB\/s)\)/ && print "$+\n"' $REPORT`
if [ "$RATE" != "" ]; then
echo $DATE $RATE >> $LOG
else
ERROR=`cat $REPORT`
echo $DATE $ERROR >> $LOG
fi