<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/blog/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://wilmer.gaa.st/blog/feeds/atom10.xml" rel="self" title="Wilmer's stuff" type="application/atom+xml" />
    <link href="http://wilmer.gaa.st/blog/"                        rel="alternate"    title="Wilmer's stuff" type="text/html" />
    <link href="http://wilmer.gaa.st/blog/rss.php?version=2.0"     rel="alternate"    title="Wilmer's stuff" type="application/rss+xml" />
    <title type="html">Wilmer's stuff</title>
    <subtitle type="html">So today I...</subtitle>
    <icon>http://wilmer.gaa.st/blog/templates/default/img/s9y_banner_small.png</icon>
    <id>http://wilmer.gaa.st/blog/</id>
    <updated>2012-04-24T04:00:45Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5.3-2">Serendipity 1.5.3-2 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:" />

    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/75-T-4-days....html" rel="alternate" title="T-4 days..." />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2012-04-22T09:16:09Z</published>
        <updated>2012-04-24T04:00:45Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=75</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=75</wfw:commentRss>
    
    
        <id>http://wilmer.gaa.st/blog/archives/75-guid.html</id>
        <title type="html">T-4 days...</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Counting down and thinking "next week this time ..." for a while already. Predictably, I've only been able to do a fraction of all the things I wanted to do in the previous post. Me spraining my ankle and ending up on crutches a few weeks ago definitely didn't help with that. :><br />
<br />
The one-way flight will be on Thursday, giving us a whole Friday + a weekend before work starts. Hoping to get stuff like opening a UK bank account done quickly, so I can then figure out the cheapest way to transfer money there; I'll miss the perks of living in a Euro country...  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/74-Do-you-hear-that,-Doug-Im-coming-to-London!.html" rel="alternate" title="Do you hear that, Doug? I'm coming to London!" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2012-03-04T21:34:23Z</published>
        <updated>2012-03-07T10:14:53Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=74</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=74</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/14-London" label="London" term="London" />
    
        <id>http://wilmer.gaa.st/blog/archives/74-guid.html</id>
        <title type="html">Do you hear that, Doug? I'm coming to London!</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a href="http://www.youtube.com/watch?v=wGbWJoZAsCs"  class="bb-url">Yes, London. You know: fish, chips, cup 'o tea, bad food, worse weather, Mary fucking Poppins... LONDON. </a> Or as I said it on Twitter last week already, I'll be subtracting 309 from my international dialing code.<br />
<br />
My team is moving to London over the next months, and I'm moving with it. It's been five years already since I landed here in Ireland by now, longer than I ever expected when I arrived. Living in the UK instead of in Ireland will be a nice change. It's still off the European continent, but with directs flights to home for both of us we'll feel like we're much closer. And I expect there are more advantages that will offset living in what is also a heavily congested city.<br />
<br />
I'll still be doing <a href="http://code.google.com/speed/public-dns/"  class="bb-url">the</a> <a href="http://tools.ietf.org/html/draft-vandergaast-edns-client-subnet-00"  class="bb-url">same</a> <a href="https://www.google.com/search?q=google+global+cache"  class="bb-url">work</a>, just in a different location for various practical reasons. The move will happen somewhere halfway the next quarter, so we're slowly starting preparations. Besides packing and cancelling utilities/services/etc, that also means experiencing Ireland as a tourist. After living here for five years, I've still not seen the Giant's Causeway, the Cliffs of Moher and some other stuff ... so should give that a shot now!<br />
<br />
I might be posting here a little bit more over the next while. :-)  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/73-uhat,-using-your-joysticks-hat-switch-in-Linux-flight-simulators.html" rel="alternate" title="uhat, using your joystick's hat switch in Linux flight simulators" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2012-03-03T13:23:00Z</published>
        <updated>2012-03-03T13:23:27Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=73</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/2-Development" label="Development" term="Development" />
            <category scheme="http://wilmer.gaa.st/blog/categories/6-Linux" label="Linux" term="Linux" />
            <category scheme="http://wilmer.gaa.st/blog/categories/11-Stuff-that-flies" label="Stuff that flies" term="Stuff that flies" />
    
        <id>http://wilmer.gaa.st/blog/archives/73-guid.html</id>
        <title type="html">uhat, using your joystick's hat switch in Linux flight simulators</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So I have this fun hobby for a while already, flying.. I have around 50 hours logged by now in the US + Ireland, which means I can more or less land safely now, on my own. In fact I had my first solo in October last year which was an absolutely amazing experience. But sometimes weather just doesn't work with me here in Ireland (either too windy or too cloudy) and instead I go "flying" with X-Plane on my machine at home.<br />
<br />
Now X-Plane is a pretty neat simulator, and as long as you use it with a real yoke/stick and not keyboard/mouse, it seems like a useful way to practice. But there's one way in which a flight simulation projected on a single screen, no matter its size, just doesn't beat sitting in a cockpit: the inability to look around in any direction by, you know, just turning your head. Instead, joysticks often have this <a href="http://marsxplr.com/_upl/aviatorlogitechjse-orig.jpg"  class="bb-url">hat switch</a> on the top to look around. Unfortunately in Linux, the joystick driver gets told that the hat switch is a mini-joystick that the user can move up/down, left/right. Instead of just representing it as four separate buttons (which is what they really are anyway, hardware-wise). X-Plane and apparently other flight simulators can't use this, they need buttons.<br />
<br />
This week I wrote <a href="http://wilmer.gaa.st/main.php/uhat.html"  class="bb-url">uhat</a> to solve this problem. It'll listen to joystick events and if you move the hat switch axes, it will generate button events on a separate virtual joystick device. There's a similar tool called jhat, which generates keyboard events instead, but I never really liked the idea of my joystick pretending to be a keyboard and hoped there were a better way to do this. A week ago I found my answer in uinput. It's poorly documented, but fortunately very simple to figure out. It looks like uinput is just a fairly 1:1 translation of the input subsystem kernel interface into a character device.<br />
<br />
It works like a charm for me, with the udev rule I don't even have to think about it, udev will just start it for me when I plug in my joystick. Hugely enjoying X-Plane 10 again. :-D  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/72-Debian,-dmcrypt-and-SSD-TRIMming.html" rel="alternate" title="Debian, dmcrypt and SSD TRIMming" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2012-02-27T22:44:36Z</published>
        <updated>1970-01-01T00:00:00Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=72</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=72</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/6-Linux" label="Linux" term="Linux" />
    
        <id>http://wilmer.gaa.st/blog/archives/72-guid.html</id>
        <title type="html">Debian, dmcrypt and SSD TRIMming</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Spent an hour or so this morning wondering how to get my Debian initramfs to activate my LUKS-encrypted partition with --allow-discards. I know it's less secure, but as long as <a href="http://xkcd.com/538/"  class="bb-url">wrenches are still cheap</a> I'm fine with sub-standard security if it means my hardware will perform better for longer. :-)<br />
<br />
The trick is to add a flag "discard" to your crypttab, like this:<br />
<br />
<div class="bb-code-title">CODE:</div><div class="bb-code">wilmer@peer&#58;~$&#160;cat&#160;/etc/crypttab<br />
sda2_crypt&#160;/dev/sda2&#160;none&#160;luks,discard</div><br />
<br />
And then of course rebuild your initramfs (update-initramfs -u) and reboot, etc.<br />
<br />
You do need cryptsetup 1.4 or higher for this to work. I had to manually install that package (only <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648868"  class="bb-url">twenty or so days old</a>) from sid on my testing laptop.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/71-Bank-statement-scraper-for-Bank-of-Ireland.html" rel="alternate" title="Bank statement scraper for Bank of Ireland" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2011-08-01T15:14:35Z</published>
        <updated>2011-08-01T15:14:35Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=71</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=71</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/2-Development" label="Development" term="Development" />
    
        <id>http://wilmer.gaa.st/blog/archives/71-guid.html</id>
        <title type="html">Bank statement scraper for Bank of Ireland</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Like many people, I was also losing track of my finance. Having bank accounts in use in both NL and IE probably didn't help. :-) As any proper FOSS geek, I learned to like the monster called <a href="http://www.gnucash.org/"  class="bb-url">GnuCash</a>. (Psst! Guys! It's pretty amazing that a product more than ten years old still doesn't let you do operations (like delete) on multiple entries at once, dont you think?)<br />
<br />
And there's this thing about Irish Banks. They have <a href="http://en.wikipedia.org/wiki/2008%E2%80%932011_Irish_banking_crisis"  class="bb-url">bigger issues</a> to worry about than how well their Internet banking service works. What keeps you away from looking at my bank account? You (hopefully) not knowing my six-digit user ID, date of birth (top secret information! Have I mentioned that my birthday is next Saturday? ;-P) and another six-digit number, this time my PIN number. No one-time passwords, no challenge-response system, nothing else.<br />
<br />
My only hope is that this lets you transfer money only to accounts to which I've transferred money before. IOW all you can do is give my landlady a little present. Pfew!<br />
<br />
Also, going back to the original topic, there's no way to export info from their web interface. So I wrote one myself. One advantage of a pretty simple website is that I could easily write <a href="http://wilmer.gaa.st/main.php/boiscrape.html"  class="bb-url">a scraper</a> for it. Run it with the right arguments, and it'll spit out a CSV bank statement, ready to be fed to your favourite accounting software.<br />
<br />
What else have I been doing? Been working on <a href="http://wilmer.gaa.st/main.php/giggity.html"  class="bb-url">Giggity</a>. Android development's fun. I spent the weekend scraping the <a href="http://www.dancevalley.com/2011/#nl/news/volledige-timetable-bekend.html"  class="bb-url">Dance Valley</a> timetable page, Google, Last.FM, Wikipedia and more to automatically generate a Giggity schedule file for it. Love it! :-)  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/70-On-Pandaboard-SD-card-performance.html" rel="alternate" title="On Pandaboard SD card performance" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2011-06-13T21:03:53Z</published>
        <updated>2011-06-20T16:10:12Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=70</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=70</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/1-OSS" label="OSS" term="OSS" />
    
        <id>http://wilmer.gaa.st/blog/archives/70-guid.html</id>
        <title type="html">On Pandaboard SD card performance</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I have the Pandaboard running as my home server for a while now. Until last weekend, I was using a Microdrive as its root filesystem. Sadly, the drive seems to be broken. :-( That means I finally had a chance to try bootstrapping a server very quickly using Puppet. This worked fairly well, which means the time investment is paying off already.<br />
<br />
Since all the storage I had at home was the 32GB SD card I bought for this thing anyway, I decided to give it another chance. At some point I was reminded already that <span style="font-weight:bold">alignment <span style="font-style:italic">really</span> matters</span> with these things. Some Bonnie++ runs do seem to confirm this. I removed the second partition on the SD, and recreated it on a 4MB barrier. (The trick to do this is to use the "u" command in fdisk to switch units to sector instead of cylinders, and make sure the start sector is a multiple of 8192.)<br />
<br />
To be honest, I did run most of these benchmarks with the SD card reader/writer in my desktop machine. Only the last test was done on my Pandaboard, but as you can see the results are very similar.<br />
<br />
<STYLE type="text/css">TABLE.small TD {font-size: 66%; padding: 0;} TABLE.small { border-width: 0 0 1px 1px; border-style: solid; } TABLE.small TD { border-width: 1px 1px 0 0; border-style: solid; } TD.header {text-align: center; backgroundcolor: "#CCFFFF" }TD.rowheader {text-align: center; backgroundcolor: "#CCCFFF" }TD.size {text-align: center; backgroundcolor: "#CCCFFF" }TD.ksec {text-align: center; fontstyle: italic }</STYLE><TABLE CELLSPACING=0 CLASS="small" ALIGN=center BORDER=3 CELLPADDING=2 CELLSPACING=1><TR><TD COLSPAN=2 class="header"><FONT SIZE=+1><B>Version 1.96</B></FONT></TD><TD COLSPAN=6 class="header"><FONT SIZE=+2><B>Sequential Output</B></FONT></TD><TD COLSPAN=4 class="header"><FONT SIZE=+2><B>Sequential Input</B></FONT></TD><TD COLSPAN=2 ROWSPAN=2 class="header"><FONT SIZE=+2><B>Random<BR />Seeks</B></FONT></TD><TD COLSPAN=1 class="header"></TD><TD COLSPAN=6 class="header"><FONT SIZE=+2><B>Sequential Create</B></FONT></TD><TD COLSPAN=6 class="header"><FONT SIZE=+2><B>Random Create</B></FONT></TD></TR><TR><TD></TD><TD>Size</TD><TD COLSPAN=2>Per Char</TD><TD COLSPAN=2>Block</TD><TD COLSPAN=2>Rewrite</TD><TD COLSPAN=2>Per Char</TD><TD COLSPAN=2>Block</TD><TD>Num Files</TD><TD COLSPAN=2>Create</TD><TD COLSPAN=2>Read</TD><TD COLSPAN=2>Delete</TD><TD COLSPAN=2>Create</TD><TD COLSPAN=2>Read</TD><TD COLSPAN=2>Delete</TD></TR><TR><TD COLSPAN=2></TD><TD class="ksec"><FONT SIZE=-2>K/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>K/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>K/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>K/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>K/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD COLSPAN=1></TD><TD class="ksec"><FONT SIZE=-2>/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD><TD class="ksec"><FONT SIZE=-2>/sec</FONT></TD><TD class="ksec"><FONT SIZE=-2>% CPU</FONT></TD></TR><TR><TD rowspan=2 bgcolor="#FFFFFF" class="rowheader"><FONT SIZE=+1>ext3-noalign</TD><TD class="size" bgcolor="#FFFFFF">4G</TD><TD bgcolor="#EB1400">189</TD><TD bgcolor="#2FD000">41</TD><TD bgcolor="#FF0000">3514</TD><TD bgcolor="#7B8400">1</TD><TD bgcolor="#C43B00">4878</TD><TD bgcolor="#08F700">1</TD><TD bgcolor="#0AF500">2646</TD><TD bgcolor="#03FC00">98</TD><TD bgcolor="#34CB00">21147</TD><TD bgcolor="#04FB00">2</TD><TD bgcolor="#F90600">20.9</TD><TD>0</TD><TD class="size" bgcolor="#FFFFFF">16</TD><TD bgcolor="#FF0000">463</TD><TD>0</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#E71800">2832</TD><TD bgcolor="#00FF00">3</TD><TD bgcolor="#CA3500">3214</TD><TD bgcolor="#00FF00">4</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#D12E00">3221</TD><TD bgcolor="#04FB00">4</TD></TR><TR><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#FF0000" COLSPAN=2>6643ms</TD><TD bgcolor="#E51A00" COLSPAN=2>28833ms</TD><TD bgcolor="#FF0000" COLSPAN=2>19841ms</TD><TD bgcolor="#03FC00" COLSPAN=2>6668us</TD><TD bgcolor="#FF0000" COLSPAN=2>483ms</TD><TD bgcolor="#EA1500" COLSPAN=2>47888ms</TD><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#01FE00" COLSPAN=2>1335us</TD><TD bgcolor="#00FF00" COLSPAN=2>655us</TD><TD bgcolor="#08F700" COLSPAN=2>933us</TD><TD bgcolor="#01FE00" COLSPAN=2>531us</TD><TD bgcolor="#0DF200" COLSPAN=2>85us</TD><TD bgcolor="#1CE300" COLSPAN=2>60814us</TD></TR><TR><TD rowspan=2 bgcolor="#FFFFFF" class="rowheader"><FONT SIZE=+1>ext3</TD><TD class="size" bgcolor="#FFFFFF">4G</TD><TD bgcolor="#AF5000">437</TD><TD bgcolor="#2DD200">93</TD><TD bgcolor="#FC0300">3727</TD><TD bgcolor="#6F9000">1</TD><TD bgcolor="#A35C00">5631</TD><TD bgcolor="#00FF00">1</TD><TD bgcolor="#00FF00">2725</TD><TD bgcolor="#01FE00">99</TD><TD bgcolor="#30CF00">21484</TD><TD bgcolor="#04FB00">2</TD><TD bgcolor="#F90600">21.5</TD><TD>0</TD><TD class="size" bgcolor="#FFFFFF">16</TD><TD bgcolor="#D82700">938</TD><TD bgcolor="#00FF00">1</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#57A800">4303</TD><TD bgcolor="#06F900">5</TD><TD bgcolor="#B74800">3743</TD><TD bgcolor="#07F800">6</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#B44B00">4304</TD><TD bgcolor="#00FF00">5</TD></TR><TR><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#10EF00" COLSPAN=2>412ms</TD><TD bgcolor="#FF0000" COLSPAN=2>32024ms</TD><TD bgcolor="#40BF00" COLSPAN=2>5622ms</TD><TD bgcolor="#00FF00" COLSPAN=2>6422us</TD><TD bgcolor="#F80700" COLSPAN=2>469ms</TD><TD bgcolor="#FF0000" COLSPAN=2>52114ms</TD><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#01FE00" COLSPAN=2>1574us</TD><TD bgcolor="#04FB00" COLSPAN=2>760us</TD><TD bgcolor="#00FF00" COLSPAN=2>713us</TD><TD bgcolor="#01FE00" COLSPAN=2>1644us</TD><TD bgcolor="#00FF00" COLSPAN=2>13us</TD><TD bgcolor="#01FE00" COLSPAN=2>585us</TD></TR><TR><TD rowspan=2 bgcolor="#FFFFFF" class="rowheader"><FONT SIZE=+1>logfs</TD><TD class="size" bgcolor="#FFFFFF">4G</TD><TD bgcolor="#00FF00">1149</TD><TD bgcolor="#00FF00">75</TD><TD bgcolor="#51AE00">13670</TD><TD bgcolor="#B34C00">5</TD><TD bgcolor="#FF0000">3530</TD><TD bgcolor="#FF0000">4</TD><TD bgcolor="#CE3100">1067</TD><TD bgcolor="#5AA500">81</TD><TD bgcolor="#FF0000">5920</TD><TD bgcolor="#FF0000">7</TD><TD bgcolor="#FF0000">6.5</TD><TD bgcolor="#FF0000">3</TD><TD class="size" bgcolor="#FFFFFF">16</TD><TD bgcolor="#7F8000">2033</TD><TD bgcolor="#36C900">9</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#2CD300">4731</TD><TD bgcolor="#C63900">22</TD><TD bgcolor="#FF0000">1755</TD><TD bgcolor="#3CC300">8</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#FF0000">1516</TD><TD bgcolor="#FF0000">11</TD></TR><TR><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#00FF00" COLSPAN=2>10944us</TD><TD bgcolor="#08F700" COLSPAN=2>1810ms</TD><TD bgcolor="#32CD00" COLSPAN=2>4562ms</TD><TD bgcolor="#FF0000" COLSPAN=2>29505us</TD><TD bgcolor="#16E900" COLSPAN=2>54279us</TD><TD bgcolor="#06F900" COLSPAN=2>2401ms</TD><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#1EE100" COLSPAN=2>568ms</TD><TD bgcolor="#FF0000" COLSPAN=2>9300us</TD><TD bgcolor="#FF0000" COLSPAN=2>7881us</TD><TD bgcolor="#FF0000" COLSPAN=2>2783ms</TD><TD bgcolor="#FF0000" COLSPAN=2>1483us</TD><TD bgcolor="#FF0000" COLSPAN=2>570ms</TD></TR><TR><TD rowspan=2 bgcolor="#FFFFFF" class="rowheader"><FONT SIZE=+1>nilfs2</TD><TD class="size" bgcolor="#FFFFFF">4G</TD><TD bgcolor="#57A800">797</TD><TD bgcolor="#11EE00">95</TD><TD bgcolor="#C13E00">7118</TD><TD bgcolor="#788700">2</TD><TD bgcolor="#B64900">5186</TD><TD bgcolor="#05FA00">1</TD><TD bgcolor="#02FD00">2711</TD><TD bgcolor="#00FF00">98</TD><TD bgcolor="#0DF200">24112</TD><TD bgcolor="#01FE00">2</TD><TD bgcolor="#00FF00">617.3</TD><TD bgcolor="#09F600">29</TD><TD class="size" bgcolor="#FFFFFF">16</TD><TD bgcolor="#798600">2102</TD><TD bgcolor="#FF0000">36</TD><TD>+++++</TD><TD>+++</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#986700">4592</TD><TD bgcolor="#FF0000">71</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#00FF00">10886</TD><TD bgcolor="#A75800">56</TD></TR><TR><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#01FE00" COLSPAN=2>20454us</TD><TD bgcolor="#10EF00" COLSPAN=2>2767ms</TD><TD bgcolor="#1AE500" COLSPAN=2>2788ms</TD><TD bgcolor="#D82700" COLSPAN=2>25974us</TD><TD bgcolor="#05FA00" COLSPAN=2>21810us</TD><TD bgcolor="#0BF400" COLSPAN=2>3432ms</TD><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#FF0000" COLSPAN=2>4928ms</TD><TD bgcolor="#13EC00" COLSPAN=2>1288us</TD><TD bgcolor="#0BF400" COLSPAN=2>1020us</TD><TD bgcolor="#01FE00" COLSPAN=2>1339us</TD><TD bgcolor="#3CC300" COLSPAN=2>358us</TD><TD bgcolor="#00FF00" COLSPAN=2>294us</TD></TR><TR><TD rowspan=2 bgcolor="#FFFFFF" class="rowheader"><FONT SIZE=+1>ext4</TD><TD class="size" bgcolor="#FFFFFF">4G</TD><TD bgcolor="#AD5200">443</TD><TD bgcolor="#2BD400">91</TD><TD bgcolor="#00FF00">18315</TD><TD bgcolor="#00FF00">2</TD><TD bgcolor="#00FF00">9299</TD><TD bgcolor="#0BF400">2</TD><TD bgcolor="#10EF00">2602</TD><TD bgcolor="#05FA00">99</TD><TD bgcolor="#00FF00">25041</TD><TD bgcolor="#00FF00">2</TD><TD bgcolor="#F90600">22.4</TD><TD>0</TD><TD class="size" bgcolor="#FFFFFF">16</TD><TD bgcolor="#00FF00">3567</TD><TD bgcolor="#13EC00">8</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#50AF00">4369</TD><TD bgcolor="#1EE100">7</TD><TD bgcolor="#B54A00">3792</TD><TD bgcolor="#0BF400">7</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#B14E00">4393</TD><TD bgcolor="#09F600">6</TD></TR><TR><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#01FE00" COLSPAN=2>32264us</TD><TD bgcolor="#00FF00" COLSPAN=2>920ms</TD><TD bgcolor="#00FF00" COLSPAN=2>926ms</TD><TD bgcolor="#48B700" COLSPAN=2>12851us</TD><TD bgcolor="#00FF00" COLSPAN=2>14137us</TD><TD bgcolor="#14EB00" COLSPAN=2>5042ms</TD><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#00FF00" COLSPAN=2>530us</TD><TD bgcolor="#18E700" COLSPAN=2>1451us</TD><TD bgcolor="#16E900" COLSPAN=2>1316us</TD><TD bgcolor="#00FF00" COLSPAN=2>393us</TD><TD bgcolor="#44BB00" COLSPAN=2>401us</TD><TD bgcolor="#01FE00" COLSPAN=2>771us</TD></TR><TR><TD rowspan=2 bgcolor="#FFFFFF" class="rowheader"><FONT SIZE=+1>ext4-panda</TD><TD class="size" bgcolor="#FFFFFF">1496M</TD><TD bgcolor="#FF0000">106</TD><TD bgcolor="#FF0000">96</TD><TD bgcolor="#1AE500">16838</TD><TD bgcolor="#FF0000">8</TD><TD bgcolor="#14EB00">8865</TD><TD bgcolor="#A45B00">7</TD><TD bgcolor="#FF0000">663</TD><TD bgcolor="#FF0000">99</TD><TD bgcolor="#26D900">22243</TD><TD bgcolor="#6B9400">12</TD><TD bgcolor="#F60900">30.1</TD><TD bgcolor="#00FF00">1</TD><TD class="size" bgcolor="#FFFFFF">16</TD><TD bgcolor="#08F700">3479</TD><TD bgcolor="#669900">26</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#718E00">4035</TD><TD bgcolor="#FF0000">23</TD><TD bgcolor="#00FF00">8760</TD><TD bgcolor="#6F9000">65</TD><TD>+++++</TD><TD>+++</TD><TD bgcolor="#0EF100">10388</TD><TD bgcolor="#CE3100">63</TD></TR><TR><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#03FC00" COLSPAN=2>78219us</TD><TD bgcolor="#19E600" COLSPAN=2>3925ms</TD><TD bgcolor="#01FE00" COLSPAN=2>961ms</TD><TD bgcolor="#51AE00" COLSPAN=2>13732us</TD><TD bgcolor="#31CE00" COLSPAN=2>104ms</TD><TD bgcolor="#00FF00" COLSPAN=2>1251ms</TD><TD class="size" bgcolor="#FFFFFF" COLSPAN=1>Latency</TD><TD bgcolor="#01FE00" COLSPAN=2>1190us</TD><TD bgcolor="#22DD00" COLSPAN=2>1801us</TD><TD bgcolor="#2AD500" COLSPAN=2>1892us</TD><TD bgcolor="#01FE00" COLSPAN=2>762us</TD><TD bgcolor="#09F600" COLSPAN=2>61us</TD><TD bgcolor="#01FE00" COLSPAN=2>671us</TD></TR></TABLE><br />
Click <a href="http://roy.gaast.net/~wilmer/bonniepp.html"  class="bb-url">here</a> for a table not f*cked up by my blog software.<br />
<br />
Although the throughput numbers for ext3 are pretty similar for non-aligned and aligned access, look at the latency numbers. Unfortunately I haven't got a clue how Bonnie++ calculates these and can't find very good documentation on it. Throughput may be average and latency worst-case? Either way, as you can see a misaligned partition can cause some slowdowns.<br />
<br />
What surprised me more is that a switch to ext4fs sped up things a lot more, up to the point that the performance is perfectly reasonable! I'm running with this SD as my root filesystem now and everything just works. (While before a simple apt-get install run could take several minutes.)<br />
<br />
While I was at it, I also tried out logfs and nilfs2, which are officially optimised for flash media. However, AFAIK they're more meant for raw NAND storage, not for block devices with all the NAND logic abstracted away (like anything you buy in stores these days). Not worth it for these SDs.<br />
<br />
Obviously this test is far from scientific. Only in the case of ext4-panda have I run the test five times to then pick a decent result (there were some outliers in all areas). All other tests were done on a freshly formatted filesystem, which I'm sure also doesn't make the result that reliable.<br />
<br />
Just my 2 cents! But my Pandaboard's definitely happier now. Here's hoping that wear leveling works well..<br />
<br />
If you're interested, <a href="https://wiki.linaro.org/WorkingGroups/Kernel/Projects/FlashCardSurvey"  class="bb-url">here</a> is a more thorough overview of SD card performance. The LWN article about flash storage it links to is interesting too. The Flash card I used here is a 32GB class 10 Transcend card.<br />
  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/69-Splitting-PDFs-with-pyPdf.html" rel="alternate" title="Splitting PDFs with pyPdf" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2011-06-03T22:04:02Z</published>
        <updated>2011-06-07T09:32:46Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=69</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=69</wfw:commentRss>
    
    
        <id>http://wilmer.gaa.st/blog/archives/69-guid.html</id>
        <title type="html">Splitting PDFs with pyPdf</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                A simple task, yet I couldn't find a quick cmdline to do it with, apart from pdftk, 15MB of Java rubbish.<br />
<br />
Instead, here only 10 or so lines of Python. It was so fast I wasn't sure if it worked until I saw the results were there. Usage: split [prefix] [infiles...]. Multiple infiles possible. First argument is the filename prefix to use for all created files.<br />
<br />
<div class="bb-code-title">CODE:</div><div class="bb-code">import&#160;pyPdf<br />
import&#160;sys<br />
<br />
n&#160;=&#160;0<br />
for&#160;f&#160;in&#160;sys.argv&#91;2&#58;&#93;&#58;<br />
	f&#160;=&#160;pyPdf.PdfFileReader&#40;open&#40;f&#41;&#41;<br />
	for&#160;p&#160;in&#160;f.pages&#58;<br />
		of&#160;=&#160;pyPdf.PdfFileWriter&#40;&#41;<br />
		of.addPage&#40;p&#41;<br />
		of.write&#40;open&#40;"%s-%03d.pdf"&#160;%&#160;&#40;sys.argv&#91;1&#93;,&#160;n&#41;,&#160;"w"&#41;&#41;<br />
		n&#160;+=&#160;1</div><br />
<br />
Don't pay attention to Serendipity screwing up the code layout. We all know it's rubbish, I just can't be arsed to migrate to something better. :-/  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/68-dnsrev.html" rel="alternate" title="dnsrev" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2011-05-24T00:09:14Z</published>
        <updated>2011-05-26T09:57:39Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=68</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=68</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/2-Development" label="Development" term="Development" />
    
        <id>http://wilmer.gaa.st/blog/archives/68-guid.html</id>
        <title type="html">dnsrev</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                As a bit of a cloud "sceptic" I still like to waste too much time maintaining my own network/IT infrastructure. :> I'm definitely trying to avoid the more tedious stuff though. I started using <a href="http://www.puppetlabs.com/"  class="bb-url">Puppet</a> a while ago which definitely helps.<br />
<br />
Last week I was looking for a way to automatically populate DNS reverse lookup zones. The only thing I could find was <a href="http://www.mkrdns.org/"  class="bb-url">mkrdns</a> which is unmaintained for almost ten years and doesn't seem to support IPv6. So I decided to write my own thing, <a href="http://gaa.st/dnsrev"  class="bb-url">dnsrev</a>.<br />
<br />
It's pretty simple, written in Python with help from some modules. It can read any number of zonefiles and update any number of reverse zonefiles. There's no need for any kind of 1:1 mapping between them, so it can deal with multiple netblocks in one zonefile, etc. I hope it'll be useful to someone. Comments, suggestions and patches are welcome.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/67-Shiny-happy-hardware.html" rel="alternate" title="Shiny happy hardware" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2011-04-23T13:05:00Z</published>
        <updated>2011-04-24T07:33:05Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=67</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=67</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/1-OSS" label="OSS" term="OSS" />
    
        <id>http://wilmer.gaa.st/blog/archives/67-guid.html</id>
        <title type="html">Shiny happy hardware</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                For years I'm using <a href="http://winterm.gaast.net/"  class="bb-url">Winterms</a> as simple home "servers". It was a fun project to work on and some people were even nice enough to send me some examples of more powerful (relatively, we're talking about ~300MHz here at most) hardware. Two of them are still working as nameservers/printservers and one of them even hosted the Winterm hacking website for a while.<br />
<br />
But they're getting old, slow, and pretty painful to upgrade. Time to move on I'm afraid. So before my last trip to the US, I ordered two shiny pieces of hardware: A <a href="http://www.pandaboard.org/"  class="bb-url">Pandaboard</a> and an <a href="http://developer.nvidia.com/tegra/tegra-devkit-features"  class="bb-url">Nvidia Tegra developer board</a>. Due to circumstances, I didn't really expect both (or even either) of them to arrive - Nvidia seemed to send the board only to people who have projects they find interesting/important (stuff like the <a href="http://en.wikipedia.org/wiki/Motorola_Xoom"  class="bb-url">Motorola Xoom</a> probably), and the Pandaboards never seem to be in stock.<br />
<br />
Yet, here I am with both of them, wondering which one to actually use. :-)<br />
<br />
<a href="http://fotos.gaast.net/stuff/20110423_armboards.jpeg"  class="bb-url"><img src="http://fotos.gaast.net/stuff/20110423s_armboards.jpeg" alt="http://fotos.gaast.net/stuff/20110423s_armboards.jpeg" class="bb-image" /></a><br />
Left: Pandaboard, right: Tegra2 250 Harmony board<br />
<br />
I guess I'll just write down my findings here so far. I'll probably end up using both, one as a server and the other one to run stuff like <a href="http://www.xbmc.org/"  class="bb-url">xbmc</a> on my TV.<br />
<br />
Both boards seem quite similar, spec-wise. Two 1GHz ARM cores, 1G of RAM, USB, sound, networking (including WiFi and Bluetooth), HDMI output, and an SD card slot. The Pandaboard has an internal antenna, no clue about the range.<br />
<br />
Although both boards' USB ports apparently aren't really meant for powering 2.5" USB HDDs, it seems to work quite well anyway. Which is good, because SD cards as root filesystems seems like a bad idea. Did you know that (according to <a href="http://www.coker.com.au/bonnie++/"  class="bb-url">bonnie++</a>) a desktop hard disk from 2007 outperforms SD cards (at least in the Pandaboard and Tegra) not just on sequential reads, but also on seeks? So yeah, I may be using USB HDDs instead, which sadly means more power usage. :-( Especially in the Pandaboard SD performance is too bad to be usable.<br />
<br />
One big advantage of the Pandaboard seems to be the community. A pretty busy (and generally helpful) IRC channel, lots of info online on Wikis. The Pandaboard iss "just another OMAP architecture" so lots of stuff that worked for BeagleBoard should work on the Panda with some customizations. Canonical/Ubuntu also <a href="https://wiki.ubuntu.com/ARM/OMAP"  class="bb-url">support</a> the thing officially.<br />
<br />
Here comes the biggest contrast with the Tegra. Nvidia seems to be <a href="http://developer.nvidia.com/tegra/forum/linux-support-becoming-unsupported"  class="bb-url">too busy with Android</a>, the result is that there's little support for doing other stuff with the board. The only thing you get for now is L4T (Linux 4 Tegra), which is an Ubuntu Jaunty (yes, 9.04, that's two years ago by now..) image you can run on it. There are efforts on getting Lucid to run, don't know where those are ATM. But one complication there is some binary-only drivers/helpers (like nvrm_daemon, which I guess manages the memory shared between OS and video/etc), which means troubles getting X to work after an upgrade. Ouch.<br />
<br />
The Panda also certainly wins in the bootloader department, as it just loads uboot stuff from a FAT partition on the SD card (tricky part here is that if you do <strong>anything</strong> wrong with the partitioning and formatting of this SD card, the boot process will just fail silently). For flashing the Tegra you need a proprietary fastboot flasher binary. Possibly, once booted, I can just write my kernels to NAND myself from inside the OS, but I haven't yet tried this.<br />
<br />
So yes, with this all in mind, it's a delight to run a normal (and not outdated) Debian/Ubuntu install on a Pandaboard. Video is also supposed to work flawlessly almost out of the box on Ubuntu. However, I seem to be unlucky/doing it wrong since the framerate is not impressive, and playback seems buggy. (While the little video playback I've done on the Tegra was pretty good, super smooth, and with only 10% of CPU usage!)<br />
<br />
For my original goal, running a simple home server, I feel that both boards are suitable - I'd just run Debian inside a chroot on the Tegra so the helper daemons (and maybe some video stuff) can run outside it. But before I get this video stuff to work, I have some work to do. And hopefully, if I wait for long enough, some other patient souls out there will also fix some of these problems...  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/66-Xen-horror,-just-upgraded-my-box-to-Squeeze.html" rel="alternate" title="Xen horror, just upgraded my box to Squeeze" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2011-02-13T23:49:48Z</published>
        <updated>1970-01-01T00:00:00Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=66</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=66</wfw:commentRss>
    
    
        <id>http://wilmer.gaa.st/blog/archives/66-guid.html</id>
        <title type="html">Xen horror, just upgraded my box to Squeeze</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Of course I could just <strong>not</strong> upgrade, but I'd have to do it sooner or later anyway..<br />
<br />
It looks like Xen, now that it's owned by Citrix, also suffers from the <a href="http://bugs.bitlbee.org/bitlbee/browser/devel/protocols/msn/soap.c#L8"  class="bb-url">XML manager syndrome</a>. At least the extremely annoying <a href="http://www.google.com/search?q=%22clocksource%2F0%3A+Time+went+backwards%22"  class="bb-url">clock bug</a> was fixed, which means I get >4ms precision in timing again.<br />
<br />
Just dumping this here in my blog since more people seem to have this problem and aren't getting very helpful answers so far. Or maybe I just didn't try the right Google queries..<br />
<br />
This:<br />
<pre>hypnotoad:/tmp# xm suspend bijtje<br />Error: Domain is not managed by Xend lifecycle support.<br />Usage: xm suspend &lt;DomainName><br />
Suspend a Xend managed domain</pre>means you're not using the shiny new (whatever the purpose is) lifecycle tool that keeps track of domain configs and other stuff in /var/lib/xend/domains/$UUID/. You can use "xm new" to set this up, except this is broken on Debian:<br />
<pre>hypnotoad:/tmp# xm new<br />Unexpected error: &lt;type 'exceptions.ImportError'><br />...<br />ImportError: No module named xmlproc</pre>This, my dear reader, means that Debian's shipping Xen utils that depend on a Python XML module that was actually removed from Debian since it's not maintained by upstream anymore.<br />
<br />
So I was just trying to figure out how to make this all go, and then I realised:<br />
<pre>hypnotoad:/tmp# xm save bijtje bijtje.sav<br />hypnotoad:/tmp# xm restore bijtje.sav</pre>Oh look! I can still do it. I just have to tell Xen where to save the statefile.<br />
<br />
So in short:<br />
<ul><li>Xen is also suffering from XML-itus<br />
<li>Debian drops packages that other packages still depend on<br />
<li>Use "xml save", not "xml suspend"</ul>  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/65-Burn-all-spammers!.html" rel="alternate" title="Burn all spammers!" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2010-08-08T14:31:06Z</published>
        <updated>2010-08-15T04:11:51Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=65</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=65</wfw:commentRss>
    
    
        <id>http://wilmer.gaa.st/blog/archives/65-guid.html</id>
        <title type="html">Burn all spammers!</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I have a habit of always having a tail -f /var/log/mail.log running on my mailserver somewhere. It's noisy, but has been useful in the past. Over the last weeks/months, I noticed open relay probes are getting incredibly popular (again), but also extremely aggressive. They're frequent, done by hundreds of botnet drones all the time.<br />
<br />
Obviously my Postfix is configured properly, so this is mostly a waste of (fairly scarce, on a DSL box several km away from the exchange) bandwidth and annoying noise in the logs.  But getting rid of it is harder than I hoped. :-(<br />
<br />
This is what I have now: iptables -I FORWARD -p tcp --sport 25 -s 192.168.0.0/16 -m string --algo kmp --string '554 5.7.1 <' -j REJECT --reject-with tcp-reset<br />
<br />
This works as-in it kills the connection as soon as my mailserver sends a "554 5.7.1 Relaying denied" response. The REJECT goes to the mailserver, but together with the tcp-reset this also kills the TCP connection on both sides fairly quickly. However, the little fuckers are also using pipelining, so I still get a screen full of logspam for pretty much every attempt. Although this is mostly cosmetic, I'd love to get rid of that crap..<br />
<br />
What I really wonder is, WTF are they even doing this? Are open relays really still that common? Don't they have their botnets already? I guess the open relays are nice multipliers and are also more willing to deal with stuff like graylisting...<br />
<br />
[edit]Looks like "554 5.7.1" is not just about "relaying denied", so possibly not such a great idea. Don't try this at home!  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/64-BitlBee,-alive-and-kicking.html" rel="alternate" title="BitlBee, alive and kicking" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2010-06-10T23:43:23Z</published>
        <updated>2010-06-11T00:09:34Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=64</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=64</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/3-BitlBee" label="BitlBee" term="BitlBee" />
    
        <id>http://wilmer.gaa.st/blog/archives/64-guid.html</id>
        <title type="html">BitlBee, alive and kicking</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                As quin in #bitlbee said a little while ago, I stole someone's mojo and found an amazing amount of productivity when it comes to writing code, and it feels great. I'm quit relieved that I can still find plenty of time and motivation to work on BitlBee even though during the week I already spend a lot of time at the keyboard. This after not working much on it for probably at least a year.<br />
<br />
I managed to finally do the <a href="http://wiki.bitlbee.org/UiFix"  class="bb-url">IRC core rewrite + abstraction</a> that I intended to do for so long already. It'll allow adding non-IRC frontends to BitlBee if someone ever wants to, and also the IRC core has the flexibility it needs to add many more features that I wanted for years already, and were impossible to implement without adding even more horrible hacks.<br />
<br />
There's also a libpurple-based backend for a few months already, plus file transfer support (written by Uli Meis and Marijn Kruisselbrink actually, it just took me a long time to merge the >3000-line diff, fortunately <a href="http://code.bitlbee.org/rb/"  class="bb-url">Review Board</a> did make it a lot less painful), all thrown into a bleeding edge branch called <a href="http://code.bitlbee.org/lh/killerbee"  class="bb-url">killerbee</a>. It's code that needs a little bit more work before I really like it.<br />
<br />
Also, BitlBee has Twitter support for about two months already (thanks to hard work done by Geert Mulders), and according to the application registration page on Twitter it has almost 500 users already. It's quite likely that many of those used it for five minutes and went back to a client with more features, but it's still nice to see.<br />
<br />
Last of all, to help with the current lack/fragmentation of online documentation there's now a <a href="http://wiki.bitlbee.org/"  class="bb-url">BitlBee Wiki</a>. Its supposed to have easy-to-find docs about common FAQs, but the easy-to-find part isn't really working out yet since it hardly shows up in any search results. Hopefully this hyperlink from a high-profile weblog will improve that a tiny bit. ;o) Possibly the content is not that good yet either, so if anyone has something to add to it, by all means, please do!<br />
<br />
With a 1.2.8 release coming up, BitlBee is totally alive - and is for almost eight years already. It's been a fun project to work on so far, and hopefully will be for a long time.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/63-Sending-files-using-netcat.html" rel="alternate" title="Sending files using netcat" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2010-05-22T20:34:34Z</published>
        <updated>2010-05-22T20:47:55Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=63</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/1-OSS" label="OSS" term="OSS" />
    
        <id>http://wilmer.gaa.st/blog/archives/63-guid.html</id>
        <title type="html">Sending files using netcat</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                There are plenty of articles about this already, but I couldn't find anyone who wrote a script to automate this simple task of transferring files using just netcat.<br />
<br />
<div class="bb-code-title">CODE:</div><div class="bb-code">wilmer@ruby&#58;~/src/bitlbee/devel$&#160;ncsend.sh&#160;/audio/03\&#160;Tree\&#160;of\&#160;Life.mp3&#160;<br />
nc&#160;87.198.255.202&#160;6886&#160;|&#160;pv&#160;&#62;&#160;03\&#160;Tree\&#160;of\&#160;Life.mp3</div><br />
<br />
Run it and it will give you a command to run/copy-paste on the remote side/pass to the person who wants the file. It uses pv as a nice progress indicator, and the script assumes pv is available on both sending and receiving ends. But that's good, everyone <i>should</i> have <a href="http://www.ivarch.com/programs/pv.shtml">pv</a> installed on his/her machine.<br />
<br />
I'd just include the code in this little article, but Serendipity would screw up the layout completely, so instead you can <a href="/downloads/ncsend.sh">download it here</a>.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/62-Gotta-love-Unix-hacks....html" rel="alternate" title="Gotta love Unix hacks..." />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2010-05-05T23:35:07Z</published>
        <updated>2010-05-08T08:17:57Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=62</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    
    
        <id>http://wilmer.gaa.st/blog/archives/62-guid.html</id>
        <title type="html">Gotta love Unix hacks...</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Forgetting your LUKS cryptopart password sucks. But writing a shell oneliner like this:<br />
<br />
<div class="bb-code-title">CODE:</div><div class="bb-code">for&#160;i&#160;in&#160;P{a,4}ssw{0,o}rd{-,}Permut{4,a}tions;&#160;do<br />
&#160;&#160;echo&#160;-n&#160;$i&#160;&#62;&#160;/tmp/pwd<br />
&#160;&#160;cryptsetup&#160;luksOpen&#160;/dev/loop0&#160;test&#160;--keyfile&#160;/tmp/pwd&#160;&amp;&amp;&#160;echo&#160;$i<br />
done</div><br />
<br />
is awesome. :-) Took me only ten minutes to get it back once I had a copy of the superblock onto my workstation.  
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://wilmer.gaa.st/blog/archives/61-spamass-milter-and-IPv6.html" rel="alternate" title="spamass-milter and IPv6" />
        <author>
            <name>Wilmer van der Gaast</name>
            <email>blog@wilmer.gaast.net</email>        </author>
    
        <published>2010-01-31T11:51:51Z</published>
        <updated>2010-02-04T11:36:49Z</updated>
        <wfw:comment>http://wilmer.gaa.st/blog/wfwcomment.php?cid=61</wfw:comment>
    
        <wfw:commentRss>http://wilmer.gaa.st/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    
            <category scheme="http://wilmer.gaa.st/blog/categories/1-OSS" label="OSS" term="OSS" />
    
        <id>http://wilmer.gaa.st/blog/archives/61-guid.html</id>
        <title type="html">spamass-milter and IPv6</title>
        <content type="xhtml" xml:base="http://wilmer.gaa.st/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                While migrating my mailserver from Ubuntu Dapper to Debian Lenny, I noticed spamass-milter didn't want to start:<br />
<br />
Could not parse "2001:770:017b::" as a network<br />
<br />
After scratching my head on that for a while (it worked on the old box!) I remembered two years ago I spent some time adding IPv6 support to spamass-milter myself. Support as-in allowing IPv6 subnets to be whitelisted/auto-accepted. Very useful if you want mails from your local IPv6 machines to be accepted automatically without waiting for 10s while spamassasin is checking if you're not a spammer...<br />
<br />
I never published the thing and now I could hardly find back the damn thing at all. :-)<br />
<br />
<a href="http://wilmer.gaast.net/downloads/spamass-milter-ipv6.diff"  class="bb-url">http://wilmer.gaast.net/downloads/spamass-milter-ipv6.diff</a><br />
<br />
Just to make sure I won't lose it again ... and maybe it'll be useful for someone else.<br />
<br />
Also just de-Ubuntufied my laptop. Debian's doing great so far: Suspend and Resume actually work better out of the box, but fonts look a bit ugly (and sometimes really less readable I'm afraid) compared to Ubuntu...  
            </div>
        </content>
        
    </entry>

</feed>
