Updated speedtest servers
This commit is contained in:
parent
e9200b32b1
commit
de0cd158a8
66
snench.sh
66
snench.sh
|
@ -54,16 +54,6 @@ redact_ip()
|
|||
esac
|
||||
}
|
||||
|
||||
finish()
|
||||
{
|
||||
printf '\n'
|
||||
rm -f test_$$
|
||||
exit
|
||||
}
|
||||
# make sure the dd test file is always deleted, even when the script is
|
||||
# interrupted while dd is running
|
||||
trap finish EXIT INT TERM
|
||||
|
||||
command_benchmark()
|
||||
{
|
||||
if [ "$1" = "-q" ]
|
||||
|
@ -86,30 +76,6 @@ command_benchmark()
|
|||
fi
|
||||
}
|
||||
|
||||
dd_benchmark()
|
||||
{
|
||||
# returns IO speed in B/s
|
||||
|
||||
# Temporarily override locale to deal with non-standard decimal separators
|
||||
# (e.g. "," instead of ".").
|
||||
# The awk script assumes bytes/second if the suffix is !~ [TGMK]B. Call me
|
||||
# if your storage system does more than terabytes per second; I'll want to
|
||||
# see that.
|
||||
LC_ALL=C "$gnu_dd" if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync 2>&1 | \
|
||||
awk -F, '
|
||||
{
|
||||
io=$NF
|
||||
}
|
||||
END {
|
||||
if (io ~ /TB\/s/) {printf("%.0f\n", 1000*1000*1000*1000*io)}
|
||||
else if (io ~ /GB\/s/) {printf("%.0f\n", 1000*1000*1000*io)}
|
||||
else if (io ~ /MB\/s/) {printf("%.0f\n", 1000*1000*io)}
|
||||
else if (io ~ /KB\/s/) {printf("%.0f\n", 1000*io)}
|
||||
else { printf("%.0f", 1*io)}
|
||||
}'
|
||||
rm -f test_$$
|
||||
}
|
||||
|
||||
download_benchmark()
|
||||
{
|
||||
curl --max-time 10 -so /dev/null -w '%{speed_download}\n' "$@"
|
||||
|
@ -255,20 +221,24 @@ then
|
|||
download_benchmark -4 http://cachefly.cachefly.net/100mb.test | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' Leaseweb (NL): '
|
||||
download_benchmark -4 http://mirror.nl.leaseweb.net/speedtest/100mb.bin | \
|
||||
printf ' Snel.com (NL): '
|
||||
download_benchmark -4 http://193.33.60.30/binfiles/100MB.bin | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' Softlayer DAL (US): '
|
||||
download_benchmark -4 http://speedtest.dal06.softlayer.com/downloads/test100.zip | \
|
||||
printf ' Hetzner (DE): '
|
||||
download_benchmark -4 http://speed.hetzner.de/100MB.bin | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' Linode NJ (US): '
|
||||
download_benchmark -4 http://speedtest.newark.linode.com/100MB-newark.bin | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' Online.net (FR): '
|
||||
download_benchmark -4 http://ping.online.net/100Mo.dat | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' OVH BHS (CA): '
|
||||
download_benchmark -4 http://speedtest-bhs.as16276.ovh/files/100Mio.dat | \
|
||||
printf ' DigitalOcean (CA): '
|
||||
download_benchmark -4 http://speedtest-tor1.digitalocean.com/100mb.test | \
|
||||
Bps_to_MiBps
|
||||
|
||||
else
|
||||
|
@ -284,20 +254,24 @@ then
|
|||
printf ' your IPv6: %s\n' "$(redact_ip "$ipv6")"
|
||||
printf '\n'
|
||||
|
||||
printf ' Leaseweb (NL): '
|
||||
download_benchmark -6 http://mirror.nl.leaseweb.net/speedtest/100mb.bin | \
|
||||
printf ' Snel.com (NL): '
|
||||
download_benchmark -6 http://[2a00:7b80:3043:1000::30]/binfiles/100MB.bin | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' Softlayer DAL (US): '
|
||||
download_benchmark -6 http://speedtest.dal06.softlayer.com/downloads/test100.zip | \
|
||||
printf ' Hetzner (DE): '
|
||||
download_benchmark -6 http://speed.hetzner.de/100MB.bin | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' Linode NJ (US): '
|
||||
download_benchmark -6 http://speedtest.newark.linode.com/100MB-newark.bin | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' Online.net (FR): '
|
||||
download_benchmark -6 http://ping6.online.net/100Mo.dat | \
|
||||
Bps_to_MiBps
|
||||
|
||||
printf ' OVH BHS (CA): '
|
||||
download_benchmark -6 http://speedtest-bhs.as16276.ovh/files/100Mio.dat | \
|
||||
printf ' DigitalOcean (CA): '
|
||||
download_benchmark -6 http://speedtest-tor1.digitalocean.com/100mb.test | \
|
||||
Bps_to_MiBps
|
||||
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue