update speedtest

This commit is contained in:
Teddysun 2016-12-01 18:36:16 +09:00 committed by GitHub
parent 029a9843e1
commit 01102bb530

View File

@ -54,14 +54,14 @@ speed_test() {
local speedtest=$(wget -4O /dev/null -T300 $1 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}')
local ipaddress=$(ping -c1 -n `awk -F'/' '{print $3}' <<< $1` | awk -F'[()]' '{print $2;exit}')
local nodeName=$2
display ${nodeName} ${ipaddress} ${speedtest}
display "${nodeName}" "${ipaddress}" "${speedtest}"
}
speed_test_v6() {
local speedtest=$(wget -6O /dev/null -T300 $1 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}')
local ipaddress=$(ping6 -c1 -n `awk -F'/' '{print $3}' <<< $1` | awk -F'[()]' '{print $2;exit}')
local nodeName=$2
display ${nodeName} ${ipaddress} ${speedtest}
display "${nodeName}" "${ipaddress}" "${speedtest}"
}
speed() {