Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

what I know about whatever the linux equivalent of batch would fit on the head of a pin,

 

I need a quick script to repeat and record the query time on dig queries in a file and echo it to the screen. , like once a minute, its the most reliable way I can see of recording and mesuring the latency/packet loss on our internet connection.

 

can you make dig bypass local dns? when our internet connection is "having problems" a manual query to an new domain jumps to around 2500ms

local queries are 6ms, normal query time to new dom is 40-150ms

 

anyone can write this for me please? thx

Posted

Short answer, yes you can tell dig to use any DNS server you wish.

 

dig @dnsserver domainname | grep "Query Time"

 

That'll return the time taken for the request but I suppose if you had a list of domains we'd be able to have it return the name of the domain in question and the time taken for the query.

 

To be honest though, 40ms is a long old time for an external resolution letalone 150ms! I'm averaging around 24ms here (when testing what I put above) .

Posted

@kmount: I think you have a typo ;)

 

The command is dig @dnsserver domainname | grep "Query time" (lowercase 't')

 

I get between 5 and 20 msec.

Posted
@kmount: I think you have a typo ;)

 

The command is dig @dnsserver domainname | grep "Query time" (lowercase 't')

 

I get between 5 and 20 msec.

 

or use case-insensitive grep: dig@dnsserver domainname | grep -i "QuErY TimE"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...