September 4th, 2008
As mentioned in a previous post I’ve been looking into a solution for maintaining an iTunes server, to stream music across my apartment to various AirPort Express units. Instead of going out and buying something, I thought I’d see if a HP server I’ve got would be cost effective to leave on 24/7. I’ve only used it for Xen testing before and never in a place where I pay the bills!
I hacked together a rig to measure the current being drawn and plugged it in, the results were totally shocking.
The Server has a dual core Xeon 2.4 Ghz CPU, 2GB of RAM and 4 hard disks so I wasn’t expecting the power usage to be low, and I was right. It averaged out at 440mA during almost everything from peak load to idle.

This calculates to roughly 100 Watts (230volts * 0.440 amps = 101.2 Watts). Where I live this would cost £2.27 a week running 24/7. This is about what I’d expect - about a pint a week - affordable but certainly not green. What really surprised me was the current when the unit was switched off - 140mA!
That equates to 32.2 Watts or £0.72 a week - switched off. When I say switched off I don’t mean in standby or hibernating, I really mean off. This, I expect, will be the same for most ATX based PC’s (that means nearly all). I think its absolutely disgusting that this device has such a high power requirement when off.
Imagine an office of 50 PC’s - 1.6kW and £25 a week (based on average office opening hours 9 - 5). A figure of over £1000 a year for powering devices which are thought to be switched off soon emerges.
Because of these findings I’ve gone all anal about this and I’m making an improved device for measuring a mix of devices. My hacked together one wasn’t really what you’d call safe to have around the home & was hard wired to a IEC connector.
Back to the iTunes server, I’m going to try out FireFly Media Server on the ML110 - under Xen. More on low power PC’s another time!
Posted in Eco Wars, Geek, Internet | No Comments »
August 31st, 2008
A week ago I took the next plunge into geekdom and got an iPhone. My overall impression is that its great, even though there are still a few flaws with the software (it hangs and its slow). The best use I’ve got for it - other than the standard email / web / blah - is the Remote application (Link - will open iTunes). Remote allows the iPhone to control iTunes, which in itself is pretty spectacular, however adding an AirPort Express to the mix makes it the best thing ever. Seriously.
The AirPort Express allows you to play music from iTunes wirelessly. This results in the ability to play your entire music collection on the stereo you connect the AirPort Express to - while controlling it with your iPhone.
There is a decent setup guide at LifeHacker which tells you everything you need to know to set this up. One thing that LifeHacker didn’t get entirely correct is the part regarding the access point - you only need WDS support if you want the AirPort Express to extend the range of your network. I’m using the router Sky sent me (some Sky branded Netgear thing) with no configuration changes and its working fine.
The next part of the challenge is scrubbing my MP3 collection and finding a decent low power device to stream it.
Posted in Geek, Internet, Me | No Comments »
June 26th, 2008
I know this doesn’t fit with what I said yesterday but I couldn’t resist!
That blows my mind!
Check out more here.
Posted in Photos | No Comments »
June 23rd, 2008
That’s going to be the new title of this blog, for a number of reasons:
- I think I’m going to have to sell my bus;
- I talk crap most of the time;
- I work in the metal packaging (can making) industry.
I’ve actually registered the domain, but wont be moving the blog there just yet, I’ve not actually decided if I’ll move it at all. If I do I’ll be sure to do it correctly this time!
So, what am I going to write on this blog? Well, I think the best way for me to stick to it and convey something marginally meaningfully is to have a strict-ish topic list that my posts must fall into:
- Travel, writing about places I’ve been to. I’m travelling quite a lot so it would be nice to record something about it and the places;
- Technology - PHP/VB.NET/Linux - what I’m interested in, this is a loose one but I’ve got some projects in the pipeline…
I’m also going to be working on a new design for the site - I don’t really like the default WordPress layout so that’s something that will hopefully appear soon.
Posted in Me, This Site | No Comments »
May 31st, 2008
Here we go - it doesn’t look too impressive now I look at it. But remember that’s only 5 months in the job. Maybe next time I’ll have to zoom out a bit!
I’ve been at home for the last two weeks so I’ve had a chance to sort out a few things that have been building up. I’ve also figured out Xen, just in time as it turns out - but that’s another post!
Posted in Me, Travel | No Comments »
May 8th, 2008
I’ve been a bit remiss when this blog is concerned - I always have been. Even though I keep telling myself I should post more often I never seem to ‘have time’. And looking back at the last 5 months that’s partially excusable - I’ve been on 12 trips in total, 6 of them overseas. That doesn’t sound like much but when 8 of them have been in the last 10 weeks it makes more sense.
So what is it like, all that travelling? Well, its interesting for a start. Its great to see new Countries and ‘ways of life’. Its good meeting new people and trying to find common ground. Its also horrible being away from home - even if it is only for a few days at a time.
There are, however, perks that come with the job. Apparently I’ve been paid (partially expenses) a decent sum of money for my 12 trips, where that extra money has gone I have no idea! I’ve managed to get a ‘flights only’ holiday for my girlfriend in Italy - and a pretty good few days away for myself! So all in, after 5 months I’m feeling a lot better about the job than I was in January. Only time will tell if I can keep up for the next 19ish months!
I’m playing with Google Earth - adding the places I’ve visited to a map, so I’ll take a screen shot of that and post it. It would be nice to have some sort of dynamic way of accessing that kind of information - ‘Places I’ve been’ - it probably does exist somewhere, I just cant find it.
Unfortunately while I was away this week my home computer (with Google Earth on) seems to have died :(. So that’s the first order of business now I’m back.
Anyway - I’m going to try to update this more often, so here goes!
Posted in Me | No Comments »
February 12th, 2008
This was the state of a whole bank of information/news terminals in Terminal two at Heathrow last week. I’m not sure if they belong to the BBC but that red bit looks familiar. Made me chuckle.

Posted in Uncategorized | No Comments »
February 1st, 2008
Its been a busy month! I’ve started a new job (for the same company) under the title of ‘Product Engineer’. Basically it involves installing, servicing and repairing products. So far I’ve been on 4 jobs; Rugby, Leicester, Carlisle and Agoncillo (about 20km from Lagrono - in the heart of the Rioja region of span). I’m writing this from Bilbao airport while I wait for my flight back home. The landscape between Bilbao and Lagrono is absolutely fantastic, I’ve taken some photos from the car so I’ll put any decent ones up in a few days.
I’m not overly excited about the prospects of spending a lot of time away from home, but I should get so see some new places so maybe I’ll get used to it. At the moment I definitely don’t like it. Seeing new cities and meeting new people is great - but it doesn’t compensate for being away from the people and places that really matter.
I’m not sure what’s going to happen in the coming months but I’m sure there will be plenty of it! I’ll try to take some interesting photos and record the events here, for my benefit as much as anyone else’s.
Posted in Uncategorized | No Comments »
December 15th, 2007
As I said in this post I’ve been exploring and using Subverison a lot recently, and with plans to start a hosted subversion arm to the web hosting business I need to keep working on the web based management tool. As everyone knows backups are crucial, so the first step towards my web based subversion management tool is the backup side of things. This is the first version of the script, I’ve been running it nightly for about 2 weeks now and it’s behaved very well so far.
I started with the script provided by Mark Shead (Backing up Subverison Automatically) however with plans for expansion I didn’t want to end up with a backup script for each repository. In addition to this I wanted the script to integrate with my envisaged web based SVN management tool, that meant database integration. In setting up the above script I found this article very helpful.
I ran with several versions of Marks script all running via cron and sending the output as email for a few days, then decided that now was a good time to integrate the script to a database and backup all of the repositories in the database. For a guide to using the script via cron see the end of the article.
I would include a SQL dump from PHPMyAdmin - but wordpress won’t let me include that in the post -but you need a single table called repo with three fields (repo_id, repo_location and repo_prefix). Any questions or comments leave a comment or email me.
Watch out for the mis-spelled SE!!!L!!!ECT - wordpress also won’t let me save the post with that line (or this line!) for some reason. I’m looking into why.
#perl modules to use
use DBI;
use DBD::mysql
#DBI config values
$host = "localhost";
$database = "database_name";
$user = "user_name";
$password = "password";
#Data Source Name
$dsn = "dbi:mysql:$database:localhost:3306";
#Perl DBI Connect
$connect = DBI->connect($dsn, $user, $password) or die "Unable to connect: $DBI::errstr\n";
#write the query
#Perl DBI Connect
$connect = DBI->connect($dsn, $user, $password) or die "Unable to connect: $DBI::errstr\n";
#write the query
$query = "SE!!!Insert L!!!ECT repo_location, repo_prefix FROM repo";
$query_handle = $connect->prepare($query);
#run the query
$query_handle->execute();
$query_handle->bind_columns(undef, \$repo_location, \$repo_prefix);
while($query_handle->fetch()) {
#my $svn_repo = $repo_location;
my $bkup_dir = "/subversion/backup";
#my $bkup_file = $repo_prefix;
my $tmp_dir = "/subversion/tmp";
my $bkup_svr = "backup.green-host.co.uk";
my $bkup_svr_login = "root";
my $remote_path = "/home/green/svn_backup";
print "\n-------------\n";
print "Backing up Repository $repo_location";
print "\n-------------\n";
$bkup_file = $repo_prefix . `date -Is`;
chomp $bkup_file;
my $youngest = `svnlook youngest $repo_location`;
chomp $youngest;
my $dump_command = "svnadmin -q dump $repo_location > $bkup_dir/$bkup_file ";
print "\nDumping Subversion repo $repo_location to $bkup_file...\n";
print `$dump_command`;
print "Backing up through revision $youngest... \n";
print "\nCompressing dump file...\n";
print `gzip -9 $bkup_dir/$bkup_file\n`;
chomp $bkup_file;
my $zipped_file = $bkup_dir . "/" . $bkup_file . ".gz";
print "\nCreated $zipped_file\n";
print `scp $zipped_file $bkup_svr_login\@$bkup_svr:$remote_path`;
print "\n$bkup_file.gz transfered to $bkup_svr\n";
#Test Backup
print "\n-------------\n";
print "Testing Backup";
print "\n-------------\n";
print "Downloading $bkup_file.gz from $bkup_svr\n";
print `scp $bkup_svr_login\@$bkup_svr:$remote_path/$bkup_file.gz $tmp_dir/`;
print "Unzipping $bkup_file.gz\n";
print `gunzip $tmp_dir/$bkup_file.gz`;
print "Creating test repository\n";
print `svnadmin create $tmp_dir/test_repo`;
print "Loading repository\n";
print `svnadmin -q load $tmp_dir/test_repo < $tmp_dir/$bkup_file`;
print "Checking out repository\n";
print `svn -q co file://$tmp_dir/test_repo $tmp_dir/test_checkout`;
print "Cleaning up\n";
print `rm -f $tmp_dir/$bkup_file`;
print `rm -rf $tmp_dir/test_checkout`;
print `rm -rf $tmp_dir/test_repo`;
}
Posted in Geek, Internet | 1 Comment »
December 13th, 2007
In one of my biggest online gaffs to-date, when I moved this blog from http://craddy.swdl.org to http://swdl.org I forgot about redirecting RSS feeds. That’s hopefully now been fixed - so if you’re reading this as a first post for a very very long time then that’s why!
If anyone’s interested this is how you can redirect a whole domain / sub-domain:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.swdl.org [NC]
RewriteRule ^(.*)$ http://www.swdl.org/$1 [R=301,L]
Obviosly change swdl.org to the domain you want to re-direct to and place the above in a .htaccess file in the source domain / sub-domain.
Tags: .htaccess redirect stupid me
Posted in Me | No Comments »