Last active
August 29, 2015 14:00
-
-
Save brunsgaard/ca304fc308a085b3a6cb to your computer and use it in GitHub Desktop.
datanet test debian mirrors
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 | |
hosts=( | |
ftp.dk.debian.org | |
ftp.cn.debian.org | |
) | |
for host in ${hosts[@]}; do | |
IP=`nslookup $host | sed 's/Address: //' | tail -n 2 | head -n 1` | |
echo ==== TESTING $IP \($host\) ==== | |
echo Ping: `ping -c 64 $IP | grep rtt` | |
echo Wget: `wget -O /dev/null $IP/debian/dists/stable/Contents-amd64.gz 2>&1 | grep 'saved' | sed 's/.*(//' | sed 's/).*//'` | |
traceroute $IP | sed 's/traceroute.*/Traceroute:/' | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment