Yet another Glastonbury ticket fiasco

Posted by – 2012/10/07

Once again we have tickets for Glastonbury Festival, and once again there’s well-founded accusations of foul play as technical festivalgoers barged through SeeTickets’s queues to the booking pages, and once again I’m not complaining.

Why did it suck, and how did everyone get around it?

More…

On software aptitude tests

Posted by – 2012/05/08

Last Monday I decided to pull out all the stops and actually get a job, meaning stop playing Minecraft, update my CV and pass it to a dozen or so agencies who appear to exist for the sole purpose of creaming money off the top of my daily rate. By Wednesday I had an interview lined up with a client, providing I pass a Loadrunner exam provided by IKM Europe. Sounds like fun… let’s do this!

More…

Favicon to PNG project moved

Posted by – 2012/02/10

I just made a small bugfix to my .favicon to PNG script, but thought it would be a better idea to put this somewhere better than a static web page.

So I’ve moved it over to GitHub where anyone can play with it, hopefully it will be more useful there.

Enjoy!

Bubbler: Monitoring homebrew CO2 production using arecord and Python

Posted by – 2012/02/08

A couple of weeks back I was thinking about monitors and sensors and had a crazy idea: it ought to be possible to gather stats on how well my plonk is fermenting by attaching a mic to the airlock and counting the bubbles. So in a moment of enthusiasm I ordered a cheap lapel microphone from eBay and forgot all about it… until Saturday morning when it finally arrived in the post.

Time for some fun!

More…

TEMPer1 temperature sensor in Linux

Posted by – 2012/01/15

Yey! Just got my PCSensor TEMPer1 USB thermometer logging in Linux. It automatically detects and does expose USB HID profiles, but there’s no way to access the data by holding down the CAPS key like it says in the docs.

Thankfully, a search for the device ID (0c45:7401 Microdia) finds ruby bindings for Temper.c by Michitaka Ohno, which conveniently includes the reverse-engineered USB protocol. So I’ve forked this on GitHub, removed the Ruby bits, edited the unit test wrapped it up in a little script that logs the time and temperature to a CSV file. It currently only supports one device, which will change if I ever get another one of these devices (spoiler: I probably will)

More…

Ubuntu printing and scanning

Posted by – 2012/01/15

I haven’t owned a printer since I had an Amiga all those years ago, but since I’ve started my homebrew mission I’ve decided I need something to print some labels. Kath got me a HP OfficeJet 4500 G510g printer/scanner/copier for my birthday, and I have to say it works wonderfully.

More…

Irrlicht website update

Posted by – 2012/01/06

The WordPress version of the Irrlicht website is now live, which means we can edit pages and post news articles using an online editor, users can post comments and we can even appoint community editors to post stuff without giving them rights to the filesystem.

Expect lots more activity there in the future :)

2011 in review

Posted by – 2012/01/05

Dear diary

Sorry for not writing to you of late, but this year has been a busy one.  I’ll make up for my lack of output with this mammoth post reviewing a small selection of interesting things I got up to this year…

More…

Anonypic and Microphone source drop

Posted by – 2011/01/03

Since I’ve not updated these two Android projects in a while, at risk of total future embarrassment (I’m still a Java newbie) I’ve decided to dump the source code on GitHub so others can make use of it. Details are on the Anonypic and Microphone project pages.

If you fix any bugs, please send a pull request and I’ll do my best to merge them in, but keep in mind this is also my first attempt at using git; expect schoolboy errors there too!

Import vmstat logs into LoadRunner

Posted by – 2010/11/15

Here’s a little script to format vmstat’s output into something you can import into LoadRunner’s analysis tool:

import sys, time
 
sys.stdout.write("Date,Time,"
                 "Proc Run,Proc sleep,"
                 "Mem swap use,Mem free,Mem buffered,Mem Cache,"
                 "Swap in,Swap out,Blocks in,Blocks out,"
                 "Interrupts,Context switches,"
                 "CPU %User,CPU %System,CPU %Idle,CPU %Wait,CPU %Stolen\n")
 
for line in iter(sys.stdin.readline, ""):
    if line[0] != 'p' and line[0:2] != ' r':
        t = time.strftime("%d/%m/%Y,%H:%M:%S", time.localtime(time.time()))
        line = ' '.join(line.split())
        line = line.replace(" ", ",")
        sys.stdout.write("%s,%s\n" % (t, line))
        sys.stdout.flush()

(Thanks to fabrizoM for the help!)

Run it from a shell script like so:

#!/bin/bash
vmstat 5 | python vmstat2csv.py >> servername-vmstat.log

Then start the job from the shell, press CTRL+Z and nohup it (so it doesn’t die if you disconnect) and tail it (so you can keep an eye on it) like so:

[1]+  Stopped                 ./log.sh
[gaz@box ~]$ bg
[1]+ ./log.sh &
[gaz@box ~]$ disown
[gaz@box ~]$ tail -f servername-vmstat.log
Date,Time,Proc Run,Proc sleep,Mem swap use,Mem free,Mem buffered,Mem Cache,Swap in,Swap out,Blocks in,Blocks out,Interrupts,Context switches,CPU %User,CPU %System,CPU %Idle,CPU %Wait,CPU %Stolen
23/11/2010,12:59:47,1,0,0,1266452,465576,2074012,0,0,2,15,0,36,0,0,99,0,0
23/11/2010,13:00:11,0,0,0,1264460,465584,2074024,0,0,0,168,581,577,1,1,94,4,0

When you’re done, import it into the Analysis tool via the Tools -> External Monitors menu. Make sure you set the correct date for the custom format and remember to keep a close eye on the timezones. If you make a mistake while importing there’s no going back, so save a backup of your analysis files before you attempt this.