<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Query on Evan Hoffman</title><link>https://evan.wtf/tags/query/</link><description>Recent content in Query on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Mon, 26 Sep 2011 12:33:28 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/query/index.xml" rel="self" type="application/rss+xml"/><item><title>Benchmarking DNS servers with Java</title><link>https://evan.wtf/2011/09/26/benchmarking-dns-servers-with-java/</link><pubDate>Mon, 26 Sep 2011 12:33:28 +0000</pubDate><guid>https://evan.wtf/2011/09/26/benchmarking-dns-servers-with-java/</guid><description>&lt;p&gt;I&amp;rsquo;m currently in the process of moving our DNS over to another provider and I was curious as to whether the old or new provider offers faster lookups. &lt;code&gt;dig&lt;/code&gt; shows query times, but I didn&amp;rsquo;t want to just run that over and over. I decided to write something to do this, in Java since I like Java. I found &lt;a href="http://mowyourlawn.com/blog/?p=8"&gt;this post,&lt;/a&gt; which has the meat of the work done already. I also read some of Sun&amp;rsquo;s &lt;a href="http://download.oracle.com/javase/1,5.0/docs/guide/jndi/jndi-dns.html"&gt;JNDI/DNS&lt;/a&gt; lookup info, which was pretty dense. All I want to do is specify the name server&amp;rsquo;s IP and do the lookup. I don&amp;rsquo;t even really care about the result, just how long the query takes.&lt;/p&gt;</description></item><item><title>Perl script to calculate DNS queries per second in BIND (named)</title><link>https://evan.wtf/2010/12/07/perl-script-to-calculate-dns-queries-per-second-in-bind-named/</link><pubDate>Tue, 07 Dec 2010 18:53:43 +0000</pubDate><guid>https://evan.wtf/2010/12/07/perl-script-to-calculate-dns-queries-per-second-in-bind-named/</guid><description>&lt;p&gt;I&amp;rsquo;m pricing out DNS providers and was asked what our current queries-per-second currently are. Sadly I had no idea. After lots of Googling I decided there was really no good way to get this information so I decided to parse the logfile myself.&#10;First, I turned on logging with timestamp in named.conf:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;logging&#10;{&#10;...&#10; # Query logging 2010-12-07&#10; channel query-log {&#10; file &amp;#34;data/queries.log&amp;#34; versions 3 size 10m;&#10; print-time yes;&#10; };&#10; category queries { query-log; };&#10;};&#10;options&#10;{&#10;...&#10; # Query logging 2010-12-07&#10; querylog yes;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;};&lt;/p&gt;</description></item></channel></rss>