<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>wuetender-junger-mann.de &#187; Reading</title>
	<atom:link href="http://wuetender-junger-mann.de/wordpress/category/reading/feed/" rel="self" type="application/rss+xml" />
	<link>http://wuetender-junger-mann.de/wordpress</link>
	<description>Der Freiheit eine Gasse</description>
	<lastBuildDate>Tue, 08 May 2012 11:59:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Unconditional Success</title>
		<link>http://wuetender-junger-mann.de/wordpress/2010/01/unconditional-success/</link>
		<comments>http://wuetender-junger-mann.de/wordpress/2010/01/unconditional-success/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 11:26:18 +0000</pubDate>
		<dc:creator>felix</dc:creator>
				<category><![CDATA[Reading]]></category>

		<guid isPermaLink="false">http://wuetender-junger-mann.de/wordpress/?p=933</guid>
		<description><![CDATA[Before I forget it completely, I have to post a link to Nick Williams&#8217; Unconditional Success. This book is outrageously funny. We kept a copy on our desk and would open it at random pages to reinvigorate the team spirit.]]></description>
			<content:encoded><![CDATA[<p>Before I forget it completely, I have to post a link to Nick Williams&#8217; <a href="http://www.amazon.co.uk/Unconditional-Success-Nick-Williams/dp/0553814273/ref=pd_sxp_grid_pt_2_1">Unconditional Success</a>. This book is outrageously funny. We kept a copy on our desk and would open it at random pages to reinvigorate the team spirit.</p>
]]></content:encoded>
			<wfw:commentRss>http://wuetender-junger-mann.de/wordpress/2010/01/unconditional-success/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visualising log files with gnuplot</title>
		<link>http://wuetender-junger-mann.de/wordpress/2009/06/visualising-log-files-with-gnuplot/</link>
		<comments>http://wuetender-junger-mann.de/wordpress/2009/06/visualising-log-files-with-gnuplot/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 17:17:28 +0000</pubDate>
		<dc:creator>felix</dc:creator>
				<category><![CDATA[Held der Kommandozeile]]></category>
		<category><![CDATA[Musik]]></category>
		<category><![CDATA[Reading]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Visionäre Projekte]]></category>

		<guid isPermaLink="false">http://wuetender-junger-mann.de/wordpress/?p=768</guid>
		<description><![CDATA[I recently had the pleasure of supporting a new system throughout its first month of production. This was a good opportunity to refresh my command line skills. As it happened I spent a lot of time looking at log files trying to figure out what happened to the productions system. I figured, that a graphical [...]]]></description>
			<content:encoded><![CDATA[<p>
I recently had the pleasure of supporting a new system throughout its first month of production. This was a good opportunity to refresh my command line skills. As it happened I spent a lot of time looking at log files trying to figure out what happened to the productions system. I figured, that a graphical representation of the events would be nice and started using <a href="http://www.gnuplot.info/">gnuplot</a>.</p>
</p>
<p>
First I started out with a bunch of bash scripts, using what your usual unix installation provides, but then I actually came up with <a href="http://github.com/fleipold/logvisualizer/tree/master">some groovy scripts</a> to provide better abstractions. A log file generally looks somewhat like this:
</p>
<pre>
04/01/1970 07:55:13 garbage
04/01/1970 09:27:48 Event 2
04/01/1970 10:01:28 garbage
04/01/1970 10:38:30 garbage
04/01/1970 10:48:36 garbage
04/01/1970 10:51:58 Event 2
04/01/1970 11:03:45 garbage
04/01/1970 11:34:03 Event 1
04/01/1970 12:24:33 garbage
05/01/1970 04:35:50 ERROR
</pre>
<p>
There is a lot of garbage plus some events we might be interested in. It allows to specify events, e.g. by providing a regexp:
</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">Event</span> EVENT1 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RegExEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Event 1&quot;</span>, ~<span style="color: #339933;">/</span><span style="color: #003399;">Event</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">/</span><span style="color: #009900;">&#41;</span>
<span style="color: #003399;">Event</span> EVENT2 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RegExEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Event 2&quot;</span>, ~<span style="color: #339933;">/</span><span style="color: #003399;">Event</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">/</span><span style="color: #009900;">&#41;</span>
<span style="color: #003399;">Event</span> ERROR <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RegExEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error&quot;</span>, ~<span style="color: #339933;">/</span>ERROR<span style="color: #339933;">/</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>
The next step is newing up a <code>TimeLineVisualizer</code> on these events and passing in a stream with the actual log:
</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">def logFile <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;test.log&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
logFile.<span style="color: #006633;">withInputStream</span> <span style="color: #009900;">&#123;</span><span style="color: #003399;">InputStream</span> stream <span style="color: #339933;">-&gt;</span>
  def visualizer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TimeLineVisualizer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>
          EVENT1,
          EVENT2,
          ERROR
  <span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  visualizer.<span style="color: #006633;">visualize</span><span style="color: #009900;">&#40;</span>stream<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>
If you have the <code>gnuplot</code> binary on your path this will yield something like this:
</p>
<p><img src="http://wuetender-junger-mann.de/wordpress/wp-content/uploads/2009/06/timeline.png" alt="timeline" title="timeline" width="846" class="alignnone size-full wp-image-771" /></p>
<p>
Also in some cases you would like to know which time of day events are most likely to happen. For producing histograms I created another visualizer (which currently takes only one event).
</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">logFile.<span style="color: #006633;">withInputStream</span> <span style="color: #009900;">&#123;</span><span style="color: #003399;">InputStream</span> stream <span style="color: #339933;">-&gt;</span>
  def visualizer <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HistogramVisualizer<span style="color: #009900;">&#40;</span>EVENT2, HistogramVisualizer.<span style="color: #006633;">HOUR_OF_DAY_BINS</span><span style="color: #009900;">&#41;</span>
  visualizer.<span style="color: #006633;">visualize</span><span style="color: #009900;">&#40;</span>stream<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>
For the example log file, which unfortunately has an even distribution of events, we get this:
</p>
<p><img src="http://wuetender-junger-mann.de/wordpress/wp-content/uploads/2009/06/histogram.png" alt="histogram" title="histogram" width="846"  class="alignnone size-full wp-image-772" /></p>
<p>
The cool thing about gnuplot is, that you can actually run these things in a cron job to produce daily reports (and mail them to the appropriate people) or on a continuous integration server to visualise how the system is being exercised by the test suite.</p>
]]></content:encoded>
			<wfw:commentRss>http://wuetender-junger-mann.de/wordpress/2009/06/visualising-log-files-with-gnuplot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Books to Go</title>
		<link>http://wuetender-junger-mann.de/wordpress/2009/03/books-to-go/</link>
		<comments>http://wuetender-junger-mann.de/wordpress/2009/03/books-to-go/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 22:13:08 +0000</pubDate>
		<dc:creator>felix</dc:creator>
				<category><![CDATA[Reading]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wuetender-junger-mann.de/wordpress/?p=748</guid>
		<description><![CDATA[Ab sofort ist der podcast zur neuen hervorragenden &#8220;BOOKS TO GO&#8221;-Taschenbuchreihe des dtv verfügbar.]]></description>
			<content:encoded><![CDATA[<p>Ab sofort ist der  podcast zur neuen hervorragenden <a href="http://www.dtv-books-to-go.de/">&#8220;BOOKS TO GO&#8221;</a>-Taschenbuchreihe des dtv verfügbar. </p>
]]></content:encoded>
			<wfw:commentRss>http://wuetender-junger-mann.de/wordpress/2009/03/books-to-go/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

