<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Log on Evan Hoffman</title><link>https://evan.wtf/tags/log/</link><description>Recent content in Log on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Mon, 08 Aug 2011 17:34:18 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/log/index.xml" rel="self" type="application/rss+xml"/><item><title>Logging RT username in Apache access_log</title><link>https://evan.wtf/2011/08/08/logging-rt-username-in-apache-access_log/</link><pubDate>Mon, 08 Aug 2011 17:34:18 +0000</pubDate><guid>https://evan.wtf/2011/08/08/logging-rt-username-in-apache-access_log/</guid><description>&lt;p&gt;&lt;a href="http://bestpractical.com/rt/"&gt;RT&lt;/a&gt; has its own internal accounting &amp;amp; tracking system for logging activity, but I was interested in even more granular stuff, like seeing who looked at which tickets. I figured it wouldn&amp;rsquo;t be that hard to log this in Apache. Well, I was kind of right, in that it wasn&amp;rsquo;t &amp;ldquo;hard,&amp;rdquo; but it took me a long time to find the right place to do it. I did finally get it though.&lt;/p&gt;</description></item><item><title>More fun parsing BIND query logs</title><link>https://evan.wtf/2010/12/13/more-fun-parsing-bind-query-logs/</link><pubDate>Mon, 13 Dec 2010 18:21:59 +0000</pubDate><guid>https://evan.wtf/2010/12/13/more-fun-parsing-bind-query-logs/</guid><description>&lt;p&gt;&amp;ldquo;But wouldn&amp;rsquo;t it be cool if it also&amp;hellip;&amp;rdquo; That phrase usually triggers a lot of wasted cycles in my brain, though it sometimes comes up with something neat. I added a super lame graph to the DNS QPS parser. Makes it really easy to see peaks &amp;amp; troughs in usage:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;2010-12-12 00:00 to 00:59 =&amp;gt; 3237, rate 0.899 queries/sec&#9;***********&#10;2010-12-12 01:00 to 01:59 =&amp;gt; 2709, rate 0.752 queries/sec&#9;**********&#10;2010-12-12 02:00 to 02:59 =&amp;gt; 2473, rate 0.687 queries/sec&#9;*********&#10;2010-12-12 03:00 to 03:59 =&amp;gt; 2171, rate 0.603 queries/sec&#9;********&#10;2010-12-12 04:00 to 04:59 =&amp;gt; 2048, rate 0.569 queries/sec&#9;*******&#10;2010-12-12 05:00 to 05:59 =&amp;gt; 1918, rate 0.533 queries/sec&#9;*******&#10;2010-12-12 06:00 to 06:59 =&amp;gt; 2120, rate 0.589 queries/sec&#9;********&#10;2010-12-12 07:00 to 07:59 =&amp;gt; 2477, rate 0.688 queries/sec&#9;*********&#10;2010-12-12 08:00 to 08:59 =&amp;gt; 2994, rate 0.832 queries/sec&#9;**********&#10;2010-12-12 09:00 to 09:59 =&amp;gt; 3704, rate 1.029 queries/sec&#9;*************&#10;2010-12-12 10:00 to 10:59 =&amp;gt; 4297, rate 1.194 queries/sec&#9;***************&#10;2010-12-12 11:00 to 11:59 =&amp;gt; 4744, rate 1.318 queries/sec&#9;****************&#10;2010-12-12 12:00 to 12:59 =&amp;gt; 5106, rate 1.418 queries/sec&#9;******************&#10;2010-12-12 13:00 to 13:59 =&amp;gt; 5311, rate 1.475 queries/sec&#9;******************&#10;2010-12-12 14:00 to 14:59 =&amp;gt; 5083, rate 1.412 queries/sec&#9;*****************&#10;2010-12-12 15:00 to 15:59 =&amp;gt; 4855, rate 1.349 queries/sec&#9;*****************&#10;2010-12-12 16:00 to 16:59 =&amp;gt; 5179, rate 1.439 queries/sec&#9;******************&#10;2010-12-12 17:00 to 17:59 =&amp;gt; 4959, rate 1.377 queries/sec&#9;*****************&#10;2010-12-12 18:00 to 18:59 =&amp;gt; 4693, rate 1.304 queries/sec&#9;****************&#10;2010-12-12 19:00 to 19:59 =&amp;gt; 4792, rate 1.331 queries/sec&#9;****************&#10;2010-12-12 20:00 to 20:59 =&amp;gt; 4799, rate 1.333 queries/sec&#9;****************&#10;2010-12-12 21:00 to 21:59 =&amp;gt; 5068, rate 1.408 queries/sec&#9;*****************&#10;2010-12-12 22:00 to 22:59 =&amp;gt; 4672, rate 1.298 queries/sec&#9;****************&#10;2010-12-12 23:00 to 23:59 =&amp;gt; 4514, rate 1.254 queries/sec&#9;****************&#10;2010-12-13 00:00 to 00:59 =&amp;gt; 3917, rate 1.088 queries/sec&#9;**************&#10;2010-12-13 01:00 to 01:59 =&amp;gt; 3458, rate 0.961 queries/sec&#9;************&#10;2010-12-13 02:00 to 02:59 =&amp;gt; 2874, rate 0.798 queries/sec&#9;**********&#10;2010-12-13 03:00 to 03:59 =&amp;gt; 2715, rate 0.754 queries/sec&#9;**********&#10;2010-12-13 04:00 to 04:59 =&amp;gt; 2690, rate 0.747 queries/sec&#9;*********&#10;2010-12-13 05:00 to 05:59 =&amp;gt; 2719, rate 0.755 queries/sec&#9;**********&#10;2010-12-13 06:00 to 06:59 =&amp;gt; 2831, rate 0.786 queries/sec&#9;**********&#10;2010-12-13 07:00 to 07:59 =&amp;gt; 3416, rate 0.949 queries/sec&#9;************&#10;2010-12-13 08:00 to 08:59 =&amp;gt; 4962, rate 1.378 queries/sec&#9;*****************&#10;2010-12-13 09:00 to 09:59 =&amp;gt; 6943, rate 1.929 queries/sec&#9;************************&#10;2010-12-13 10:00 to 10:59 =&amp;gt; 8296, rate 2.304 queries/sec&#9;****************************&#10;2010-12-13 11:00 to 11:59 =&amp;gt; 8938, rate 2.483 queries/sec&#9;******************************&#10;2010-12-13 12:00 to 12:59 =&amp;gt; 8926, rate 2.479 queries/sec&#9;******************************&#10;2010-12-13 13:00 to 13:59 =&amp;gt; 8950, rate 2.486 queries/sec&#9;******************************&#10;2010-12-13 14:00 to 14:59 =&amp;gt; 2173, rate 0.604 queries/sec&#9;********&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can see pretty quickly that 4-5 AM (Eastern) is the period of lowest activity, as you&amp;rsquo;d probably expect for a US-based US-centric site. Modified perl script below.&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>