<?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>trivia &#187; tips, tricks and howtos</title>
	<atom:link href="http://baldric.net/category/tips-tricks-and-howtos/feed/" rel="self" type="application/rss+xml" />
	<link>http://baldric.net</link>
	<description>another voice in the babble on the net</description>
	<lastBuildDate>Sun, 25 Jul 2010 20:17:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>email address images</title>
		<link>http://baldric.net/2010/05/03/email-address-images/</link>
		<comments>http://baldric.net/2010/05/03/email-address-images/#comments</comments>
		<pubDate>Mon, 03 May 2010 16:06:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[images]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=562</guid>
		<description><![CDATA[Adding valid email addresses to web sites is almost always a bad idea these days. Automated &#8216;bots routinely scan web servers and harvest email addresses for sale to spammers and scammers. And in some cases, email addresses harvested from commercial web sites can be used in targetted social engineering attacks. So, posting your email address [...]]]></description>
			<content:encoded><![CDATA[<p>Adding valid email addresses to web sites is almost always a bad idea these days. Automated &#8216;bots routinely scan web servers and harvest email addresses for sale to spammers and scammers. And in some cases, email addresses harvested from commercial web sites can be used in targetted social engineering attacks. So, posting your email address to a website in a way which is useful to human being, but not to a &#8216;bot has to be a &#8220;good thing&#8221; (TM). One way of doing so is to use an image of an address rather than text itself. Of course this has the disadvantage that the address will not be immediately usable by client email software (unless, of course you defeat the object of the exercise by adding an html &#8220;mailto&#8221; tag to the image) but it should be no big deal for someone who wants to contact you to write the address down.</p>
<p>There are a number of web sites which offer a (free) service which allows you to plug in an email address and then download an image generated from that address. However, I can&#8217;t get over the suspicion that this would be an ideal way to actually harvest valid email addresses, moreover addresses which you could be pretty certain the users did not want exposed to spammers. Call me paranoid, but I prefer to control my own privacy.</p>
<p>There are also a number of web sites (and blog entries) describing how to use <a href="http://netpbm.sourceforge.net/">netpbm</a> tools to create an image from text &#8211; one of the better ones (despite its idiosyncratic look) is at <a href="http://www.robsworld.org/pbmtopng.html">robsworld</a>. But in fact it is pretty easy to do this in <a href="http://www.gimp.org/">gimp</a>. Take a look at the address below:</p>
<p><a href="http://baldric.net/wp-content/uploads/2010/05/no-such-email.png"><img src="http://baldric.net/wp-content/uploads/2010/05/no-such-email.png" alt="" title="no-such-email" width="257" height="17" class="aligncenter size-full wp-image-564" /></a></p>
<p>This was created as follows:</p>
<blockquote><p>open gimp and create a new file with a 640&#215;480 template (actually any template will do);<br />
select the text tool and choose a suitable font size, colour etc;<br />
enter the text of the address in the new file;<br />
select image -> autocrop image;<br />
select layer -> Transparency -> Colour to Alpha;<br />
select from white (the background colour) to alpha;<br />
select save-as and use the file extension .png &#8211; you will be prompted to export as png.
</p></blockquote>
<p>Now add the image to your web site.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/05/03/email-address-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 10.04 &#8211; minor, and some not so minor, irritations</title>
		<link>http://baldric.net/2010/05/02/ubuntu-10-04-minor-and-some-not-so-minor-irritations/</link>
		<comments>http://baldric.net/2010/05/02/ubuntu-10-04-minor-and-some-not-so-minor-irritations/#comments</comments>
		<pubDate>Sun, 02 May 2010 17:32:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[free software]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=553</guid>
		<description><![CDATA[If and when the teething problems in 10.04 are fixed and the distro looks stable enough to supplant my current preferred version, I will be faced with one or two usability issues. In this version, canonical have taken some design decisions which seem to have some of the fanbois frothing at the mouth. The most [...]]]></description>
			<content:encoded><![CDATA[<p>If and when the teething problems in 10.04 are fixed and the distro looks stable enough to supplant my current preferred version, I will be faced with one or two usability issues. In this version, canonical have taken some design decisions which seem to have some of the fanbois frothing at the mouth. The most obvious change in the new &#8220;light&#8221; theme applied is the move of the window control buttons from the top right to the top left (a la Mac OSX). Personally I don&#8217;t find this a problem, but it seems to have started all sorts of religious wars and has apparently even resulted in Mark Shuttleworth being branded as a despot because he had the temerity to suggest that the ubuntu community was not a democracy. Design decisions are taken by the build team, not by polling the views of the great unwashed. In my view that is how it should be. The great beauty of the free software movement is the flexiibility and freedom it gives its users to change anything they don&#8217;t like. Hell, you can even build your own linux distro if you don&#8217;t like any of the (multiple) offerings available. Complaining about a design decision in one distro simply means that the complainant hasn&#8217;t understood the design process, and further, probably doesn&#8217;t understand that if he or she doesn&#8217;t like it, then they are perfectly free to change that decision on their own implementation.</p>
<p>In fact, it is pretty easy to change the button layout. To do so, simply run &#8220;gconf-editor&#8221;  then select <strong>apps -> metacity -> general</strong> from the left hand menu. Now highlight the <strong>button_layout</strong> attribute and change the entry as follows:</p>
<blockquote><p>change<br />
close,minimize,maximize:<br />
to<br />
:minimize,maximize,close</p></blockquote>
<p> i.e. move the colon from the right hand end of the line to the left and relocate the close button to the outside. Bingo, your buttons are now back where god ordained they should be and all is right in the universe.</p>
<p>Presentation issues aside, there are some more fundamental design issues which are indicative of a worrying trend. As I noted in the post below, it is now pretty easy to install restricted codecs as and when they are needed. Rhythmbox will happily pull in the codecs needed to play MP3 encoded music with only a minor acknowledgement that the codecs have been deliberately omitted from the shipped distribution for a reason &#8211; the format is closed and patent encumbered. Most users won&#8217;t care about the implications here, but I think it is only right that they should know the implications of using a closed format before accepting it. It is also worth bearing in mind that some software (including that necessary to watch commercial DVDs) is deliberately not shipped because the legal implications of doing so are problematic in many countries.</p>
<p>So, whilst from a usability perspective, I may applaud the decisions which have made it easy for the less technically savvy users to get their multimedia installations up and running with minimal difficulty, I find myself more than a little unhappy with the implications. </p>
<p>But it gets worse. Enter ubuntu one.</p>
<p>Ubuntu one attempts to do for ubuntu what iTunes does for Apple (but without the DRM one hopes&#8230;.). The new service is integrated with rhythmbox and allows users to search for and then pay for music on-line. The big problem here is that the music is all encoded in MP3 format when ubuntu, as a champion of free software, could have chosen the (technically superior) patent free ogg vorbis format. The choice smacks of business &#8220;realpolitick&#8221; in a way that I find disappointing from a company like Canonical. Compare and contrast this approach with the strictly free and open stance taken by Debian and you have to wonder where Canonical is going.  </p>
<p>Watch this space. If they introduce DRM in any form there will be an unholy row. </p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/05/02/ubuntu-10-04-minor-and-some-not-so-minor-irritations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>webDAV in lighttpd on debian</title>
		<link>http://baldric.net/2010/03/31/webdav-in-lighttpd-on-debian/</link>
		<comments>http://baldric.net/2010/03/31/webdav-in-lighttpd-on-debian/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 21:11:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=519</guid>
		<description><![CDATA[I back up all my critical files to one of my slugs using rsync over ssh (and just because I am really cautious I back that slug up to another NAS). Most of the files I care about are the obvious photos of friends and family. I guess that most people these days will have [...]]]></description>
			<content:encoded><![CDATA[<p>I back up all my critical files to one of my slugs using rsync over ssh (and just because I am really cautious I back that slug up to another NAS). Most of the files I care about are the obvious photos of friends and family. I guess that most people these days will have large collections of jpeg files on their hard disks whereas previous generations (including myself I might add) would have old shoe boxes filled with photographs. </p>
<p>The old shoe box approach has much to recommend it. Not least the fact that anyone can open that box and browse the photo collection without having to think about user ids or passwords, or having to search for a some way of reading the medium holding the photograph. I sometimes worry about how future generations&#8217; lives will be subtly impoverished by the loss of the serendipity of discovery of said old shoe box in the attic. Somehow the idea of the discovery of a box of old DVDs doesn&#8217;t feel as if it will give the discoverer the immediate sense of delight which can follow from opening a long forgotten photo album.  Old photographs feel &#8220;real&#8221; to me in a way that digital images will never do. In fact the same problem affects other media these days. I am old enough (and sentimental enough) to have a stash of letters from friends and family past. These days I communicate almost exclusively via email and SMS. And I feel that I have lost some part of me when I lose some old messages in the transfer from one &#8216;phone to another or from one computing environment to another. </p>
<p>In order to preserve some of the more important photographs in my collection I print them and store them in old fashioned albums. But that still leaves me with a huge number of (often similar) photographs in digital form on my PC&#8217;s disk. As I said, I back those up regularly, but my wife pointed out to me that only I really know where those photos are, and moreover, they are on media which are password protected. What happens if I fall under a bus tomorrow? She can&#8217;t open the shoebox.</p>
<p>Now given that all the photos are on a networked device, it is trivially easy to give her acccess to those photos from her PC. But I don&#8217;t like samba, and NFS feels like overkill when all she wants is read-only access to a directory full of jpegs. The slug is already running a web server and her gnome desktop conveniently offers the capability to connect to a remote server over a variety of different protocols, including the rather simple option of WebDAV. So all I had to do was configure lighty on the slug to give her that access.</p>
<p>Here&#8217;s how:-</p>
<p>If not already installed, then run aptitude to install &#8220;lighttpd-mod-webdav&#8221;. If you want to use basic authenticated access then it may also be useful to install &#8220;apache2-utils&#8221; which will give you the apache htpasswd utility.  The htpasswd authentication function uses unix crypt and is pretty weak, but we are really only concerned here with limiting browsing of the directory to local users on the local network, and if someone has access to my htpasswd file then file I&#8217;ve got bigger problems than just worrying about them browsing my photos. There are other authentication mechanisms we can use in lighty if we really care &#8211; although I would argue that if you really want to protect access to a network resource you shouldn&#8217;t be providing web access in the first place.</p>
<p>To enable the webdav and auth modules, you can simply  run &#8220;lighty-enable-mod webdav&#8221; and &#8220;lighty-enable-mod auth&#8221; (which actually just create symlinks from the relevant files in /etc/lighttpd/conf-available to /etc/lighttpd/conf-enabled directories) or you can activate the modules directly in /etc/lighttpd/lighttpd.conf or the appropriate virtual-host configuration file with the directives:</p>
<blockquote><p>server.modules                += ( &#8220;mod_auth&#8221; )<br />
server.modules                += ( &#8220;mod_webdav&#8221; )</p></blockquote>
<p>lighty is pretty flexible and doesn&#8217;t really care where you activate the modules. The advantage of using the &#8220;lighty-enable-mod&#8221; approach however, is that it allows you to quickly change by running &#8220;lighty-disable-mod whatever&#8221; at a future date. The symlink will then be removed and so long as you remember to restart lighty, the module activation will cease.</p>
<p>Now to enable the webdav access to the directory in question we need to configure the virtual host along the following lines:</p>
<blockquote><p>$HTTP["host"] == &#8220;slug&#8221; {<br />
# turn off directory listing (assuming that it is on by default elsewhere)<br />
server.dir-listing      = &#8220;disable&#8221;</p>
<p># turn on webdav on the directory we wish to share<br />
$HTTP["url"] =~ &#8220;^/photos($|/)&#8221; {<br />
    webdav.activate = &#8220;enable&#8221;<br />
    webdav.is-readonly = &#8220;enable&#8221;<br />
    webdav.sqlite-db-name = &#8220;/var/run/lighttpd/lighttpd.webdav_lock.db&#8221;<br />
    auth.backend = &#8220;htpasswd&#8221;<br />
    auth.backend.htpasswd.userfile = &#8220;/etc/lighttpd/htpasswd&#8221;<br />
    auth.require = ( &#8220;&#8221; => ( &#8220;method&#8221; => &#8220;basic&#8221;,<br />
                             &#8220;realm&#8221; => &#8220;photos&#8221;,<br />
                             &#8220;require&#8221; => &#8220;valid-user&#8221; ) )<br />
  }</p>
<p>}</p></blockquote>
<p>Note that the above configuration will allow any named user listed in the file /etc/lighttpd/htpasswd read only access to the &#8220;/photos&#8221; directory on the virtual host called &#8220;slug&#8221; if they can sucessfully authenticate. Note also, however, that because directory listing is turned off, it will not be possible for that user to access this directory with a web browser (which would be possible if listing were allowed). Happily however, the gnome desktop (&#8220;Connect to server&#8221; mechanism) will still permit authenticated access and once connected will provide full read only access to all files and subdirectories of &#8220;/photos&#8221; in the file browser (which is what we want). The &#8220;auth.backend&#8221; directive tells lighty that we are using the apache htpasswd authentication mechanism and the file can be found at the location specified (make sure this is outside webspace). the &#8220;auth.require&#8221; directives specify the authentication method (bear in mind that &#8220;basic&#8221; is clear text, albeit base64 encoded, so authenticatiion credentials can be trivially sniffed off the network); the &#8220;realm&#8221; is a string which will be displayed in the dialogue box presented to the user (though it has additional functions if <a href="http://redmine.lighttpd.net/wiki/1/Docs:ModAuth">digest authentication</a> is used); &#8220;require&#8221; specifies which authenticated users are allowed access. This can be useful if you have a single htpasswd file for multiple virtual hosts (or directories) and you wish to limit access to certain users. </p>
<p>Passing authentication credentials in clear over a hostile network is not smart, so I would not expose this sort of configuration to the wider internet. However, the webDAV protocol supports ssl encryption so it would be easy to secure the above configuration by changing the setup to use lighty <a href="http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:SSL">configured for ssl</a>. I choose not to here because of the overhead that would impose on the slug when passing large photographic images &#8211; and I trust my home network&#8230;&#8230;  </p>
<p>Now given that we have specified a password  file called &#8220;htpasswd&#8221; we need to create that file in the &#8220;/etc/lighttpd&#8221; configuration directory thusly:</p>
<blockquote><p>httpasswd -cm /etc/lighttpd/htpasswd user</p></blockquote>
<p>The -c switch to htpasswd creates the file if it does not already exist. When adding any subsequent users you should omit this switch or the file will be recreated (and thus overwritten). The &#8220;user&#8221; name adds the named user to the file. You will be prompted for the password for that user after running the command. As I mentioned above, by default the password will only be encrypted by crypt, the -m switch used forces htpasswd to use (the stronger) MD5 hash. Note that htpasswd also gives the option of SHA (-s switch) but this is not supported by lighty in <a href="http://redmine.lighttpd.net/wiki/1/Docs:ModAuth">htpasswd authentication</a>. Make sure that the passwd file is owned by root and is not writeable by non root users (&#8220;chown root:root htpasswd; chmod 644 htpasswd&#8221; if necessary).</p>
<p>The above configuration also assumes that the files you wish to share are actually in the directory called &#8220;photos&#8221; in the web root of the virtual host called &#8220;slug&#8221;. In my case this is not true because I have all my backup files outside the webspace on the slug (for fairly obvious reasons). In order to share the files we simply need to provide a symlink to the relevant directory outside webspace.</p>
<p>Now whenever the backup is updated, my wife has access to the latest copy of all the photos in the shoebox. But let&#8217;s hope I don&#8217;t fall under a bus just yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/03/31/webdav-in-lighttpd-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unplugged</title>
		<link>http://baldric.net/2010/03/30/unplugged/</link>
		<comments>http://baldric.net/2010/03/30/unplugged/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 15:28:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=508</guid>
		<description><![CDATA[My earlier problems with the sheevaplug all seem to have stemmed from the fact that I had installed Lenny to SDHC cards. As I mentioned in my post of 7 March, I burned through two cards before eventually giving up and trying a new installation to USB disk. This seems to have fixed the problem [...]]]></description>
			<content:encoded><![CDATA[<p>My earlier problems with the sheevaplug all seem to have stemmed from the fact that I had installed Lenny to SDHC cards. As I mentioned in my post of 7 March, I burned through two cards before eventually giving up and trying a new installation to USB disk. This seems to have fixed the problem and my plug is now stable. I had a series of problems with the SD cards I used (class 4 SDHC 8 GB cards) which may have been related to the quality of the cards I used. Firstly the root filesystem would often appear as readonly and the USB drive holding my apt-mirror (mounted as /home2) would similarly appear to be mounted read-only. This seemed to occur about every other day and suggested to me that the plug had seen a problem of some kind and rebooted. But of course since the filesystem was not writeable, there were no logs available to help my investigations. </p>
<p>I persevered for around two weeks during which time I completely rebuilt both the original SD card and another with Martin&#8217;s <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html">tarball</a>, reflashed uboot with the latest from his site, and reset the uboot environment to the factory defaults before trying again. I also changed /etc/fstab to take out the &#8220;errors=remount-ro&#8221; entry against the root filesystem, and reduced the number of writes to the card by adding &#8220;noatime, commit=180&#8243; in the hope that I could a) gain stability, and b) find out what was going wrong. No joy. I still came home to a plug with a /home2 that was either unmounted or completely unreadable or mounted RO. The disk checked out fine on another machine and I could find nothing obvious in the logs to suggest why the damned thing was failing in the first place. Martin&#8217;s site says that &#8220;USB support in u-boot is quite flaky&#8221;. My view is somewhat stronger than that, particularly when the plug boots from another device and then attaches a USB disk. </p>
<p>But I don&#8217;t give up easily. After getting nowhere with the SDHC card installation from Martin&#8217;s tarball, I reset the uboot environment on the plug to the factory default (again) and then ran a network installation of squeeze to a 1TB USB disk (following Martin&#8217;s <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html">howto</a>). It took me two attempts (I hit the <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530909">bug</a> in the partitioner on the first installation) but I now have a stable plug running squeeze. It is worth noting here that I had to modify the uboot &#8220;bootcmd&#8221; environment variable to include a reset (as Martin suggests may be necessary) so that the plug will continue to retry after a boot failure until it eventually loads. The relevant line should read:  </p>
<blockquote><p>setenv bootcmd &#8216;setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0&#215;00800000 0&#215;01100000; reset&#8217;
</p></blockquote>
<p>The plug now boots successfully every second or third attempt. So far it has been up just over ten days now without any of the earlier problems recurring.</p>
<p>My experience appears not to be all that unusual. There has been some considerable discussion on the debian-arm list of late about problems with installation to SDHC cards. Most commentators conclude that wear levelling on the cards (particularly cheap ones) may not be very good. SD cards are sold formatted as FAT or FAT32 (depending on the capacity of the card). Modern journalling filesystems such as ext3 on linux result in much higher read/write rates and the quality of the cards becomes a much greater concern. Perhaps my cards just weren&#8217;t good enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/03/30/unplugged/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>psp video revisited</title>
		<link>http://baldric.net/2010/03/21/psp-video-revisited/</link>
		<comments>http://baldric.net/2010/03/21/psp-video-revisited/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 20:03:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[free software]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[psp]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=498</guid>
		<description><![CDATA[I last posted about ripping DVDs to PSP format back in November 2007. Since then I have used a variety of different mechanisms to transcode my DVDs to the MP4 format preferred by my PSP. A couple of years ago I experimented with both winff and a command line front end to ffmpeg called handbrake. [...]]]></description>
			<content:encoded><![CDATA[<p>I last posted about <a href="http://baldric.net/2007/11/25/update-to-ripping-dvds-to-a-sony-psp-on-linux/">ripping DVDs to PSP format</a> back in November 2007. Since then I have used a variety of different mechanisms to transcode my DVDs to the MP4 format preferred by my PSP. A couple of years ago I experimented with both <a href="http://code.google.com/p/winff/wiki/UbuntuInstallation">winff</a> and a command line front end to ffmpeg called <a href="http://handbrake.fr/">handbrake</a>. Neither were really as successful as I would have liked (though winff has improved over the past few years) so I usually fell back to the mencoder script that works for 95% of all the DVDs I buy.</p>
<p> I have continually upgraded the firmware on my PSP since 2007 so that I am now running version 6.20 (the latest as at today&#8217;s date). Somewhere between version 3.72 and now, sony decided to stop being so bloody minded about the format of video they were prepared to allow to run on the PSP. We are still effectively limited to mpeg-4/h.264 video wth AAC audio in an mp4 container, but the range of encoding bitrates and video resolutions is no longer as strictly limited as it was back in late 2007.  So when going about converting all the DVDs I received for christmas and my last birthday and considering whether I should I move my viewing habits to take advantage of the power of my N900, I recently revisited my transcoding options.</p>
<p>Despite the attractiveness of the N900&#8242;s media player I concluded that it still makes sense to use the PSP  for several reasons:- it works; the battery lasts for around 7 hours between charges; I have a huge investment in videos encoded to run on it; and most importantly, not using the the N900 as intensively as I use the PSP means that I know that my &#8216;phone will be charged enough to use as a &#8216;phone should I need it. </p>
<p>But whilst revisiting my options I discovered that the latest version of handbrake (0.9.4) now has a rather nice GUI and it will rip and encode to formats usable by both the PSP and a variety of other hand-held devices (notably apple&#8217;s iphone and ipod thingies) quite quickly and efficiently. Unfortunately for me, the latest version is only available as a .deb for ubuntu 9.10 and I am still using 8.04 LTS (because it suits me).  A quick search for alternative builds led me to the <a href="https://launchpad.net/~handbrake-ubuntu/+archive/ppa">ppa site for handbrake</a> which gives builds up to version 0.9.3 for my version of ubuntu.  See below:</p>
<p><a href="http://baldric.net/wp-content/uploads/2010/03/handbrake.png"><img src="http://baldric.net/wp-content/uploads/2010/03/handbrake-300x198.png" alt="image of handbrake gui" title="handbrake" width="300" height="198" class="aligncenter size-medium wp-image-499" /></a></p>
<p>This version works so well on my system that I no longer have to use my mencoder script. </p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/03/21/psp-video-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>plug instability</title>
		<link>http://baldric.net/2010/03/07/plug-instability/</link>
		<comments>http://baldric.net/2010/03/07/plug-instability/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 19:59:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=488</guid>
		<description><![CDATA[I&#8217;m still having a variety of problems with my sheevaplug. Not least of which is the fact that SDHC cards don&#8217;t seem to be the best choice of boot medium. I have had failures with two cards now and some searching of the various on-line fora suggests that I am not alone here. In particular, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still having a variety of problems with my sheevaplug. Not least of which is the fact that SDHC cards don&#8217;t seem to be the best choice of boot medium. I have had failures with two cards now and some searching of the various on-line fora suggests that I am not  alone here. In particular, SD cards seem to suffer badly under the read/write load that is routine for an OS writing log files &#8211; let alone one running a file or web server. I have also had several failures with my external USB drive. It seems that the plug boots too quickly for the USB subsystem to initialise properly. This means that there is not enough time for the relevant device file (/dev/sda1 in my case) to appear before /etc/fstab is read to mount the drive. A posting on the <a href="http://plugcomputer.org/plugforum/index.php?PHPSESSID=6547feecf243aec9ea4b53ed652a8a05&#038;topic=485.0">plugcomputer.org </a>forum suggested a useful workaround (essentially introducing a wait), but even that was only partially sucessful. Sometimes it worked, sometimes it didn&#8217;t.  In fact, the USB drive still often fails after a random (and short) time and then remounts read-only. Attempts to then remount the drive manually (after a umount) result in failure with the error message &#8220;mount: special device /dev/sda1 does not exist&#8221;.  </p>
<p>In my attempts to cure both the booting problems and the USB connection failures I have installed the <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html">latest uboot</a> (3.4.27 with pingtoo patches linked to from Martin&#8217;s site) and updated my lenny kernel to Martin&#8217;s <a href="http://people.debian.org/~tbm/orion">2.6.32-2-kirkwood</a>  in the (vain as it turns out) hope that the latest software would help. Here I also discovered another annoying problem &#8211; installing the latest kernel does not result in a new kernel image, the plug still boots into the old kernel until you run &#8220;flash-kernel&#8221;. Fortunately this is reasonably well known and is covered in Martin&#8217;s <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/troubleshooting.html">troubleshooting</a> page.</p>
<p>I will persevere for perhaps another week with the current plug configuration. If I can&#8217;t get a stable system though I will try installing to USB drive (perverse as that may seem) and changing the uboot to boot from that rather than the flaky SD card. Most on-line advice suggests that USB support in uboot is rather &#8220;immature&#8221;, but it can&#8217;t be any worse than the current setup. My thinking is that if I can introduce a delay in the boot process by uboot so that I can successfully boot from an external HDD, the drive connection might then be stable enough to be usable.</p>
<p>Of course I could be completely wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/03/07/plug-instability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>from slug to plug</title>
		<link>http://baldric.net/2010/02/28/from-slug-to-plug/</link>
		<comments>http://baldric.net/2010/02/28/from-slug-to-plug/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 21:49:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=473</guid>
		<description><![CDATA[Well this took rather longer than expected. I intended to write about my latest toy much earlier than this, but several things got in the way &#8211; more of which later. About three or four weeks ago I bought myself a new sheevaplug. The plug has been on sale in the US for some time, [...]]]></description>
			<content:encoded><![CDATA[<p>Well this took rather longer than expected. I intended to write about my latest toy much earlier than this, but several things got in the way &#8211; more of which later. </p>
<p>About three or four weeks ago I bought myself a new <a href="http://www.globalscaletechnologies.com/p-22-sheevaplug-dev-kit-us.aspx">sheevaplug.</a> </p>
<p><a href="http://baldric.net/wp-content/uploads/2010/02/SheevaPlug2b_small1.jpg"><img src="http://baldric.net/wp-content/uploads/2010/02/SheevaPlug2b_small1.jpg" alt="image of sheevaplug" title="SheevaPlug" width="250" height="187" class="size-full wp-image-476" /></a></p>
<p>The plug has been on sale in the US for some time, but UK shipping costs added significantly to $99 US retail price.  Recently however, a UK supplier (<a href="http://www.newit.co.uk/">Newit</a>) has started stocking and selling the plugs over here &#8211; and at very good prices too. My plug arrived within three days of order and I can thoroughly recommend Newit. The owner, one Jason King no less (fans of 1970&#8242;s TV will recognise the name), kept me informed of progress from the time I placed the order to the time it was shipped. He even took the trouble to email me after shipping to check that I had received it OK. Nice touch, even if it was automated.</p>
<p>Looking much like a standard &#8220;wall wart&#8221; power supply typically attached to an external disk, the plug is actually quite chunky, but it will still fit comfortably in the palm of your hand. Inside that little box though there is enough computing power to make a slug owner more than happy. The processor is a 1.2 GHz Marvell Kirkwood ARM-compatible device and it is coupled with 512MB SDRAM and 512MB Flash memory.  Compare that to the poor old slug&#8217;s 266 MHz processor and 32 MB of flash and you can see why I&#8217;d be interested &#8211; particularly since the plug can run debian (and <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/">Martin Michlmayr</a> has again provided a <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html">tarball and instructions</a> to help you out.  </p>
<p>The plugs come in a variety of flavours, but all offer at least one USB 2.0 port, a mini usb serial port, gigabit ethernet and an SDHC slot. This means that debian (or another debian based OS such as Ubuntu) can be installed either to the internal flash or to one of the external storage media available.  Newit ship the plugs in various configurations and will happily sell you a device fully prepared with debian (either Lenny or Squeeze according to your taste) on SD card to go with the standard Ubuntu 9.04 in flash. Personally I chose to install debian myself, so I bought the base model. (No, I&#8217;m not a cheapskate, I just prefer to play. Where&#8217;s the fun in buying stuff that &#8220;just works&#8221;?) </p>
<p>Given that Martin&#8217;s instructions suggest that installing to USB disk can be problematic, and that I have debian lenny on my slugs (and had a spare 4 Gig SDHC card lying around)  I chose to use his tarball to install lenny to my SDHC card. Firstly I formatted the card (via a a USB mounted card reader) as  below:</p>
<blockquote><p>/dev/sdb1 512 Meg bootable<br />
/dev/sdb2 2.25 Gig<br />
/dev/sdb3 1024 Meg swap</p></blockquote>
<p>(note that the plug will see these devices as &#8220;/dev/mmcblk0pX&#8221; when the card is loaded. The &#8220;/dev/sdbX&#8221; layout simply reflects the fact that I was using a USB mounted card reader on my PC. )</p>
<p>I then downloaded and installed Martin&#8217;s lenny tarball to the newly formatted card and as instructed edited the /etc/fstab to match my installation. Martin&#8217;s fstab file is below:</p>
<blockquote><p># /etc/fstab: static file system information.<br />
#<br />
# <file system> <mount point>   <type><br />
<options>       <dump>
<pass>
proc            /proc           proc    defaults        0       0<br />
# Boot from USB:<br />
/dev/sda2       /               ext2    errors=remount-ro 0       1<br />
/dev/sda1       /boot           ext2    defaults        0       1<br />
/dev/sda3       none            swap    sw              0       0<br />
# Boot from SD/MMC:<br />
#/dev/mmcblk0p2       /         ext2    errors=remount-ro 0       1<br />
#/dev/mmcblk0p1       boot      ext2    defaults        0       1<br />
#/dev/mmcblk0p3       none      swap    sw              0       0</p></blockquote>
<p>As you can see it defaults to assuming a USB attached device. You need to comment out the USB boot entries and uncomment the SD/MMC entries if. like me, you are intending to boot from SD card. At this stage I also edited &#8220;/etc/network/interfaces&#8221; to change the eth0 interface from dhcp to static (to suit my network) and I changed &#8220;/etc/resolv.conf&#8221; because the default includes references to cyrius.com and a local IP address for DNS.</p>
<p>Before we can boot from the SD card, we have to make a few changes to the uboot boot loader configuration to stop it using the default OS on internal flash (where the factory installed Ubuntu resides). Again, Martin&#8217;s instructions are helpful here but he points to the <a href="http://www.openplug.org/plugwiki/index.php/Setting_up_Serial_Console_Under_Linux">openplug.org wiki</a> for instructions in setting up the necessary serial connection to the plug. On my PC (running Ubuntu 8.04 LTS) I got no ttyUSB devices by default and &#8220;modprobe usbserial&#8221; did not work but &#8220;<strong>modprobe ftdi_sio vendor=0x9e88 product=0x9e8f</strong>&#8221; did work for me.</p>
<p>Now open a TTY session using cu thusly &#8220;<strong>cu -s 115200 -l /dev/ttyUSB1</strong>&#8221; &#8211; don&#8217;t use putty on linux, it doesn&#8217;t allow cut and paste which can be very useful if you are following on-line instructions (of course it helps if you cut and paste the <strong>right</strong> instructions). I found that booting is too fast if you have to switch on the plug and then return to a keyboard so I recommend simply leaving the terminal session open and resetting the plug with a pin or paper clip. Hit any key to interrupt the boot session, then follow Martin&#8217;s instructions for editing the uboot environment.</p>
<p>My plug was running v 3.4.16 of uboot, so at first I used version 3.4.27 (downloaded from <a href="http://plugcomputer.org/plugforum/index.php?PHPSESSID=20f99cd93e9f29e51b82d585426b841c&#038;topic=1134.0">plugcomputer.org</a>) and loaded that via tftp as described by Martin, But this turmed out to be a mistake because my plug failed to boot thereafter. I got the following error message via the serial console:</p>
<blockquote><p>## Booting image at 00400000 &#8230;<br />
   Image Name:   Debian kernel<br />
   Created:      2009-11-23  17:25:02 UTC<br />
   Image Type:   ARM Linux Kernel Image (uncompressed)<br />
   Data Size:    1820320 Bytes =  1.7 MB<br />
   Load Address: 00008000<br />
   Entry Point:  00008000<br />
   Verifying Checksum &#8230; Bad Data CRC
</p></blockquote>
<p>Some searching suggested that the uboot image was probably the problem and that reverting to v3.4.19 would solve this. So I downloaded 3.4.19 from &#8220;vioan&#8217;s&#8221; <a href="http://plugcomputer.org/plugforum/index.php?PHPSESSID=c8e73c40cac9d0f1301ff24cb5803a45&#038;topic=968.0">post &#8220;#6 on: November 16, 2009, 03:21:34 PM&#8221; </a> at the plugcomputer.org forum and reflashed the plug with that image. Success &#8211; my plug now booted into debian lenny. Tidy up, update the OS and add a normal user as recommended and we&#8217;re ready to go. </p>
<p>My plug was intended to replace the slug I was using as my local apt-mirror. That mirror is now fairly large because I have a mix of 32 and 64 bit ubuntus (of varying vintages) and 386 and ARM versions of debian. I therefore recycled an unused 500 gig lacie USB disk and mounted that as /home2 (originally as /home, but I soon changed that when I wanted to unmount it frequently and then lost my home directory&#8230;.)  Copying the apt-mirror (175 Gig) over the network from my old slug was clearly going to take forever &#8211; high speed networking is not the slug&#8217;s forte, so I mounted both the slug and the plug&#8217;s disks locally on my PC and copied the files over USB &#8211; much faster. It was here that I discovered why the old lacie disk (a &#8220;designed by porsche&#8221; aluminium coated beast) was lying idle. I&#8217;d forgotten that it sounded like a harrier jump jet on take off when in use. I put up with that for a week &#8211; just long enough to get me to a free weekend when I could rebuild the old slug (now used as just an NTP server and the <a href="http://webcam.baldric.net/">webcam</a>) to boot from a 4 gig USB stick so that I could recycle its disk onto the plug. I&#8217;ve just finished doing that.</p>
<p>One other problem I found with the plug which caused me much head scratching (and delayed my writing this as I noted above) was that it consistently failed to boot back into my debian install after a &#8220;reboot&#8221; or &#8220;shutdown -r&#8221; &#8211; I had to power cycle the device to get it to boot properly. I spent some time this weekend with the serial port connected before I noticed (using &#8220;printenv&#8221; at the uboot prompt) that I had mixed up the uboot environment variables printed on Martin&#8217;s site. I had actually copied part of the instructions for the USB boot variant instead of the correct ones for the SD card boot. Sometimes &#8220;cut and paste&#8221; can be a mistake.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/02/28/from-slug-to-plug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>life is too short to use horde</title>
		<link>http://baldric.net/2010/01/23/life-is-too-short-to-use-horde/</link>
		<comments>http://baldric.net/2010/01/23/life-is-too-short-to-use-horde/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 20:13:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[free software]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[mail and mail lists]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=446</guid>
		<description><![CDATA[I own a bunch of different domains and run a mail service on all of them. In the past I have used a variety of different ways of providing mail, from simple pop/imap using dovecot and postfix, through to using the database driven mail service in egroupware. Recently I have consolidated mail for several of [...]]]></description>
			<content:encoded><![CDATA[<p>I own a bunch of different domains and run a mail service on all of them. In the past I have used a variety of different ways of providing mail, from simple pop/imap using <a href="http://baldric.net/upstream-authentication-with-tls-on-postfix/">dovecot and postfix</a>, through to using the database driven mail service in <a href="http://baldric.net/using-postfix-and-dovecot-to-provide-mail-to-egroupware/">egroupware</a>.</p>
<p>Recently I have consolidated mail for several of my domains onto one of my VPSs. I don&#8217;t have a lot of mail users so at first I stuck with the simple approach available to all dovecot/postfix installations, i.e. &#8211; using dovecot as the local delivery mechanism and simply telling postfix to hand off incoming mail to dovecot. Dovecot then has to figure out where to deliver mail. I also used a simple password file for the <a href="http://wiki.dovecot.org/Authentication/PasswordSchemes">dovecot password</a> mechanism. This mechanism worked fine for a small number of users, but it rapidly becomes a pain if you have multiple users across multiple domains and you wish to allow those users to change their passwords remotely. The solution is to move user management to a MySQL backend and change the postfix and dovecot configurations to use that backend database.</p>
<p>Now to allow (virtual) users to change their mail passwords, most on-line documentation points to the sork password module for <a href="http://www.horde.org/">horde</a>. But have you /seen/ horde? Sheesh, what a dog&#8217;s breakfast of overengineered complexity. I flatter myself that I can find may away around most sysadmin problems. but after most of a day one weekend trying to install and configure the entire horde suite  just so that I could use the remote password changing facility I gave up in disgust and went searching for an easier mechanism. Sure enough I found just what I wanted in the shape of <a href="http://postfixadmin.sourceforge.net/">postfixadmin</a>. This is a php application which provides a web based interface for managing mailboxes, virtual domains and aliases on a postfix mail server. </p>
<p>Postfixadmin is easy to install and has few dependencies (beyond the obvious php/postfix/mysql). There are even ubuntu/debian packages available for users of those distributions. I also found an excellent installation howto at <a href="http://rimuhosting.com/knowledgebase/linux/mail/postfixadmin">rimuhosting</a> which I can recommend.  </p>
<p>I can now manage all my virtual domains, user mailboxes and aliases from one single point &#8211; and the users can manage their passwords and vacation messages from a simple web interface. </p>
<div id="attachment_447" class="wp-caption aligncenter" style="width: 310px"><a href="http://baldric.net/wp-content/uploads/2010/01/postfixadmin-admin-create-domain.jpg"><img src="http://baldric.net/wp-content/uploads/2010/01/postfixadmin-admin-create-domain-300x177.jpg" alt="image of postfixadmin page" title="postfixadmin-admin-create-domain" width="300" height="177" class="size-medium wp-image-447" /></a><p class="wp-caption-text">postfixadmin domain creation</p></div>
<p>Whilst I currently only provide pop3s/imaps mail access through dovecot, postfixadmin offers a <a href="http://squirrelmail.org/">squirrelmail</a> plugin to integrate webmail should I wish to do that in future.</p>
<p>Simple, elegant and above all, usable. And it didn&#8217;t take all day to install either.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/01/23/life-is-too-short-to-use-horde/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using scroogle</title>
		<link>http://baldric.net/2010/01/02/using-scroogle/</link>
		<comments>http://baldric.net/2010/01/02/using-scroogle/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 22:18:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=428</guid>
		<description><![CDATA[For completeness, my post below should have pointed to the scroogle search engine which purportedly allows you to search google without google being able to profile you. Neat idea if you must use google (why?) but it still fails the Hal Roberts test of what to do if the intermediate search engine is prepared to [...]]]></description>
			<content:encoded><![CDATA[<p>For completeness, my post below should have pointed to the <a href="http://www.scroogle.org/cgi-bin/scraper.htm">scroogle</a> search engine which purportedly allows you to search google without google being able to profile you. Neat idea if you must use google (why?) but it still fails the <a href="http://blogs.law.harvard.edu/hroberts/2009/01/09/popular-chinese-filtering-circumvention-tools-dynaweb-freegate-gpass-and-firephoenix-sell-user-data/">Hal Roberts</a> test of what to do if the intermediate search engine is prepared to sell your data. I actually quite like the scroogle proxy though, particularly in its <a href="https://ssl.scroogle.org/">ssl</a> version because anything that upsets google profiling has to be a good thing. Besides, the really <a href="http://baldric.net/2009/07/05/tor-on-a-vps/">paranoid</a> can simply connect to scroogle via tor. </p>
<p>(Odd that google seem not to have tried to grab the scroogle domain name. If they do, let&#8217;s just hope that they get the <a href="http://www.theregister.co.uk/2009/12/30/google_groovle/">groovle</a> answer.) </p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/01/02/using-scroogle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>system monitoring with munin</title>
		<link>http://baldric.net/2009/11/15/system-monitoring-with-munin/</link>
		<comments>http://baldric.net/2009/11/15/system-monitoring-with-munin/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 18:22:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=364</guid>
		<description><![CDATA[A while back a friend and colleague of mine introduced me to the server monitoring tool called munin which he had installed on one of the servers he maintains. It looked interesting enough for me to stick it on my &#8220;to do&#8221; list for my VPSs. Having a bunch of relevant stats presented in graphical [...]]]></description>
			<content:encoded><![CDATA[<p>A while back a friend and colleague of mine introduced me to the server monitoring tool called <a href="http://munin.projects.linpro.no/">munin</a> which he had installed on one of the servers he maintains. It looked interesting enough for me to stick it on my &#8220;to do&#8221; list for my VPSs. Having a bunch of relevant stats presented in <a href="http://munin.ping.uio.no/ping.uio.no/bimbo.ping.uio.no.html">graphical form</a> all in one place would be useful. So this weekend I decided to install it on both my mail and web VPS and my tor node.</p>
<p>Munin can be installed in a master/slave configuration where one server acts as the main monitoring station and periodically polls the others for updated stats. This is the setup I chose, and now this server (my web and mail host) acts as the master and my <a href="http://toroftheworld.aibohphobia.org/">tor node</a> is a slave. Each server in the cluster must be set to run the munin-node monitor (which listens by default on port 4949) to allow munin itself to connect and gather stats for display. The configuration file allows you to restrict connections to specific IP addresses. On the main node I limit this to local loopback whilst on the tor node I allow the master to connect in addition to local loopback. And just to be on the safe side, I reinforced this policy in my iptables rules.</p>
<p>The graphs are drawn using <a href="http://oss.oetiker.ch/rrdtool/">RRDtool</a>, which can be a little heavy on CPU usage, certainly too heavy for the slugs which ruled out my installing the master locally rather than on one of the VPSs. But the impact on my bytemark host looks perfectly acceptable so far.</p>
<p>One of the neatest things about munin is its open architecture. Statistics are all collected via a series of plugins. These plugins can be written in practically any scripting language you care to name.  In the plugins which came by default with the standard debian install of munin I found plugins mostly written as shell scripts with the occasional perl script. However, a couple of the additional scripts I installed were written in php and python. The standard set of plugins covers most of what you would expect to monitor on a linux server (cpu, memory i/o, process stats, mail traffic etc). but there were two omissions which were quite important to me. One was for lighttpd, the other for tor. I found suitable candidates on-line pretty quickly though. The tor monitor plugin can be found on the <a href="http://muninexchange.projects.linpro.no/">munin exchange</a> site (a repository of third party plugins). I couldn&#8217;t find a lighttpd plugin there but eventually picked one up from <a href="http://thomasfischer.biz/posts/custom-munin-plugins-the-easy-way-or-python-rocks-perl-sucks">here</a> (thomas is clearly not a perl fan).</p>
<p>Most plugins (at least those supplied by default in the the debian package) &#8220;just work&#8221;, but some do need a little extra customisation. For example the &#8220;ip_ &#8221; plugin (which monitors network traffic on specified IP addresses) gets its stats from iptables and assumes that you have an entry of the form:</p>
<blockquote><p>-A INPUT -d 192.168.1.1<br />
-A OUTPUT -s 192.168.1.1
</p></blockquote>
<p>at the top of your iptables config file. You also need to ensure that the &#8220;ip_&#8221; plugin is correctly named with the suffix formed of the IP address to be monitored (e.g. &#8220;ip_&#8221; becomes &#8220;ip_192.168.1.1&#8243;). The simplest way to do this (and certainly the best way if you wish to monitor multiple addrresses) is to ensure that the symlink from &#8220;/etc/munin/plugins/ip_&#8221; to &#8220;/usr/share/munin/plugins/ip_&#8221; is named correctly. Thus (in directory /etc/munin/plugins):</p>
<blockquote><p>ln -s /usr/share/munin/plugins/ip_  ip_192.168.1.1
</p></blockquote>
<p>The lighttpd plugin I found also needs a little bit of work before you can see any useful stats. The plugin connects to lighty&#8217;s &#8220;server status&#8221; URL to gather its information. So you need to ensure that you have loaded the mod_status module in your lighty config file and you have specified the URL correctly (any name will do, it just has to be connsistent in both the lighty config and the plugin). It is also worth restricting access to  the URL to local loopback if you are not going to access the stats directly from a browser from elsewhere. This sort of entry in your config file should do:</p>
<blockquote><p>server.modules += ( &#8220;mod_status&#8221; )</p>
<p>$HTTP["remoteip"] == &#8220;127.0.0.1&#8243; {<br />
       status.status-url = &#8220;/server-status&#8221;<br />
       }
</p></blockquote>
<p>The tor plugin connects to the tor control port (9051 by default) but this port is normally not configured because it poses a security risk if configured incorrectly. Unless you also specify one of &#8220;HashedControlPassword&#8221; or &#8220;CookieAuthentication&#8221;, in the tor config file, then setting this option will cause tor to allow <strong>any</strong> process on the local host to control it. This is a &#8220;bad thing&#8221; (TM). If you choose to use the tor plugin, then you should ensure that access to the control port is locked down. The tor plugin assumes that you will use &#8220;CookieAuthentication&#8221;, but the path to the cookie is set incorrectly for the standard debian install (which sets the tor data directory to /var/lib/tor rather than the standard /etc/tor). </p>
<p>So far it all looks good, but I may add further plugins (or remove less useful ones) as I experiment with munin over the next few weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2009/11/15/system-monitoring-with-munin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
