Skip to content

Instantly share code, notes, and snippets.

@p120ph37
Created November 19, 2020 23:00
Show Gist options
  • Save p120ph37/57c3f893f075bfef15f0106383456724 to your computer and use it in GitHub Desktop.
Save p120ph37/57c3f893f075bfef15f0106383456724 to your computer and use it in GitHub Desktop.
Time the DNS query response time for a particular domain name
perl -MTime::HiRes=gettimeofday,tv_interval -e'my $tv=[gettimeofday];gethostbyname($ARGV[0]);print tv_interval($tv)."\n"' -- example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment