Skip to content

Instantly share code, notes, and snippets.

@jsarenik
Last active August 29, 2015 14:11
Show Gist options
  • Save jsarenik/067dbb7caa880a468188 to your computer and use it in GitHub Desktop.
Save jsarenik/067dbb7caa880a468188 to your computer and use it in GitHub Desktop.
#!/bin/bash
TESTDOMAIN=${1:-'embed.apiary.io'}
trap "exit 1" INT
OUTPUTLINES=`dig +short ${TESTDOMAIN}. @8.8.8.8 | wc -l`
servers="
208.80.68.212
204.14.152.2
204.14.152.5
"
while true
do
for server in $servers
do
lines=`dig +time=1 +short ${TESTDOMAIN}. @$server | wc -l`
test $lines -ne $OUTPUTLINES && { echo; echo $server ERROR; } >&2 || {
echo -n . >&2
}
sleep 0.1
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment