diff --git a/01_dnsping.sh b/01_dnsping.sh index 1b9f8c1..8e3ea31 100755 --- a/01_dnsping.sh +++ b/01_dnsping.sh @@ -7,6 +7,7 @@ cd ~/dev/dnspingtest_rrd/ || exit 1 PING=/usr/bin/dnsping COUNT=4 # higher count = smoother / finer "loss" scale; lower count = less caching effects DEADLINE=1 # even 1s (1000ms) is much too long to wait for! +tcp='' # --- # inspired by: https://github.com/gitthangbaby/dnsperftest/blob/patch-1/dnstest_random#L28-L35 @@ -38,7 +39,7 @@ dnsping_host() { domain=${domain:=heise.de} fi echo "querying $domain for $1" - output="$($PING -q -c $COUNT -w $DEADLINE -s "$1" "$domain" 2>&1)" + output="$($PING "$tcp" -q -c $COUNT -w $DEADLINE -s "$1" "$domain" 2>&1)" # notice $output is quoted to preserve newlines temp=$(echo "$output"| awk ' BEGIN {pl=100; rtt=0.1} @@ -73,6 +74,11 @@ fi resolverlist="$(grep -v ^\# dnsresolvers.list)" [ -z "$resolverlist" ] && exit 1 for resolver in $resolverlist; do + if echo "$resolver"|grep -q 'T'; then + resolver="$(echo "$resolver"|cut -d "-" -f1)" + tcp="-T" + echo $resolver $tcp + fi # create rrd-file from scratch if not existing: if ! [ -f data/dnsping_"${resolver}".rrd ]; then /usr/bin/rrdtool create data/dnsping_"${resolver}".rrd \ diff --git a/02_dnsping-graph.sh b/02_dnsping-graph.sh index 852c3d7..f29dcf8 100755 --- a/02_dnsping-graph.sh +++ b/02_dnsping-graph.sh @@ -12,6 +12,10 @@ resolverlist="$(grep -v ^\# dnsresolvers.list)" [ -z "$resolverlist" ] && exit 1 for resolver in $resolverlist; do + if echo "$resolver"|grep -q 'T'; then + resolver="$(echo "$resolver"|cut -d "-" -f1)" + fi + # create html-file from "template" if not existing: for file in index_"$resolver"*.html; do if [ ! -e "$file" ]; then diff --git a/dnsresolvers.list b/dnsresolvers.list index f320c6d..8d99fb6 100644 --- a/dnsresolvers.list +++ b/dnsresolvers.list @@ -71,5 +71,5 @@ 193.110.81.0 193.110.81.9 185.253.5.9 -76.76.2.38 -76.76.2.39 +76.76.2.38-T +76.76.2.39-T