[Dnsmasq-discuss] can dnsmasq report DNS resolve time in ms?

Simon Kelley simon at thekelleys.org.uk
Wed Sep 8 22:16:39 BST 2010

Adam Dingle wrote:
> Hello -
> I'm running dnsmasq on my Ubuntu machine, and I'd like to gather 
> statistics about how quickly my ISP's DNS server handles all the DNS 
> queries I throw at it.  So I'd like dnsmasq to report how many 
> milliseconds it takes the upstream DNS server to respond to queries.  I 
> tried logging to a file, but the timestamp on each line has a 1-second 
> resolution, which is not good enough since I want a count in 
> milliseconds.  So I can't see any way to get this information from 
> dnsmasq - is this correct?  Would you accept a patch that caused dnsmasq 
> to report elapsed milliseconds on each response from a DNS server 
> (possibly enabled via yet another command-line option?)

I'd certainly consider a patch.

Another option might be to use syslog-ng, which can certainly add
sub-second timestamps. As dnsmasq logs the query and the answer in
different messages, that should be all you need.



More information about the Dnsmasq-discuss mailing list