From 35902e776077952985c64fa3c45020092d8aca20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yavuz=20Ayd=C4=B1n?= Date: Thu, 15 Apr 2021 17:41:45 +0200 Subject: [PATCH] Updated speedtest servers output --- snench.sh | 55 ++++++++++++------------------------------------------- 1 file changed, 12 insertions(+), 43 deletions(-) diff --git a/snench.sh b/snench.sh index dcbd53e..91b8656 100755 --- a/snench.sh +++ b/snench.sh @@ -132,7 +132,7 @@ then awk -F: ' /cpu MHz/ {freq=$2} END {print freq " MHz"}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//' printf 'RAM: ' free -h | awk 'NR==2 {print $2}' - if [ "$(swapon -s | wc -l)" -lt 2 ] + if [ "$(free | awk '/Swap/ {printf $2}')" -eq "0" ] then printf 'Swap: -\n' else @@ -217,29 +217,12 @@ then printf ' your IPv4: %s\n' "$(redact_ip "$ipv4")" printf '\n' - printf ' Cachefly CDN: ' - download_benchmark -4 http://cachefly.cachefly.net/100mb.test | \ - Bps_to_MiBps - - printf ' Snel.com (NL): ' - download_benchmark -4 http://193.33.60.30/binfiles/100MB.bin | \ - Bps_to_MiBps - - 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 ' DigitalOcean (CA): ' - download_benchmark -4 http://speedtest-tor1.digitalocean.com/100mb.test | \ - Bps_to_MiBps + printf " %-30s %-10s\n" "Cachefly CDN" "$(download_benchmark -4 http://cachefly.cachefly.net/100mb.test | Bps_to_MiBps)" + printf " %-30s %-10s\n" "Snel.com (NL)" "$(download_benchmark -4 http://193.33.60.30/binfiles/100MB.bin | Bps_to_MiBps)" + printf " %-30s %-10s\n" "Hetzner (DE)" "$(download_benchmark -4 http://speed.hetzner.de/100MB.bin | Bps_to_MiBps)" + printf " %-30s %-10s\n" "Online.net (FR)" "$(download_benchmark -4 http://ping.online.net/100Mo.dat | Bps_to_MiBps)" + printf " %-30s %-10s\n" "Linode NJ (US)" "$(download_benchmark -4 http://speedtest.newark.linode.com/100MB-newark.bin | Bps_to_MiBps)" + printf " %-30s %-10s\n" "DigitalOcean (CA)" "$(download_benchmark -4 http://speedtest-tor1.digitalocean.com/100mb.test | Bps_to_MiBps)" else printf 'No IPv4 connectivity detected\n' @@ -254,25 +237,11 @@ then printf ' your IPv6: %s\n' "$(redact_ip "$ipv6")" printf '\n' - printf ' Snel.com (NL): ' - download_benchmark -6 http://[2a00:7b80:3043:1000::30]/binfiles/100MB.bin | \ - Bps_to_MiBps - - 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 ' DigitalOcean (CA): ' - download_benchmark -6 http://speedtest-tor1.digitalocean.com/100mb.test | \ - Bps_to_MiBps + printf " %-30s %-10s\n" "Snel.com (NL)" "$(download_benchmark -6 http://[2a00:7b80:3043:1000::30]/binfiles/100MB.bin | Bps_to_MiBps)" + printf " %-30s %-10s\n" "Hetzner (DE)" "$(download_benchmark -6 http://speed.hetzner.de/100MB.bin | Bps_to_MiBps)" + printf " %-30s %-10s\n" "Online.net (FR)" "$(download_benchmark -6 http://ping6.online.net/100Mo.dat | Bps_to_MiBps)" + printf " %-30s %-10s\n" "Linode NJ (US)" "$(download_benchmark -6 http://speedtest.newark.linode.com/100MB-newark.bin | Bps_to_MiBps)" + printf " %-30s %-10s\n" "DigitalOcean (CA)" "$(download_benchmark -6 http://speedtest-tor1.digitalocean.com/100mb.test | Bps_to_MiBps)" else printf 'No IPv6 connectivity detected\n'