Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Measuring speeds



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='/var/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







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org