Created
June 10, 2012 01:09
-
-
Save alghanmi/2903361 to your computer and use it in GitHub Desktop.
Test Connection Speed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Network speed testing..." | |
cachefly=$( wget -O /dev/null http://cachefly.cachefly.net/100mb.test 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from CacheFly: $cachefly " | |
linodeatl=$( wget -O /dev/null http://atlanta1.linode.com/100MB-atlanta.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Linode, Atlanta GA: $linodeatl " | |
linodedltx=$( wget -O /dev/null http://dallas1.linode.com/100MB-dallas.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Linode, Dallas, TX: $linodedltx " | |
linodejp=$( wget -O /dev/null http://tokyo1.linode.com/100MB-tokyo.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Linode, Tokyo, JP: $linodejp " | |
linodeuk=$( wget -O /dev/null http://london1.linode.com/100MB-london.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Linode, London, UK: $linodeuk " | |
#leaseweb=$( wget -O /dev/null http://mirror.leaseweb.com/speedtest/100mb.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
#echo "Download speed from Leaseweb, Haarlem, NL: $leaseweb " | |
slsg=$( wget -O /dev/null http://speedtest.sng01.softlayer.com/downloads/test100.zip 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Softlayer, Singapore: $slsg " | |
slwa=$( wget -O /dev/null http://speedtest.sea01.softlayer.com/downloads/test100.zip 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Softlayer, Seattle, WA: $slwa " | |
slsjc=$( wget -O /dev/null http://speedtest.sjc01.softlayer.com/downloads/test100.zip 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Softlayer, San Jose, CA: $slsjc " | |
slwdc=$( wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test100.zip 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Softlayer, Washington, DC: $slwdc " | |
ovhgr=$( wget -O /dev/null http://130.255.184.98/100mb.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Germany: $ovhgr " | |
vnhn=$( wget -O /dev/null http://123.30.129.231/100mb.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
echo "Download speed from Vinahost, Hanoi, VN: $vnhn " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Comprehensive Speed Test
I was given this script by a user in the #FranTech IRC channel. I don't remember the user and could not recover the URL.