Real-time Tube Tracking

I have a lot of respect for the folks at the Greater London Assembly, especially those who worked to get the Train Prediction API exposed and available.

Many people have seen Matthew Somerville‘s Live Map of Underground Trains which was whipped up in a frighteningly short time.

I’m working on a Rails interface to the Train Prediction API, with an ‘advanced’ mode for those who grok the tube. It’s a little rusty, and not even beta-quality, but it’s available for you to play with if you so wish.

Here’s hoping that particular box stands up to the load :)

Reducing Nagios’ CPU load when using SNMP plugins

I have a virtual machine which has 100 hosts and 600 services being monitored through Nagios. 400 of these services are monitored via SNMP plugins.

One of our system administrators mentioned that this VM was quite CPU hungry, so I set about trying to lighten things up. I found that the simple act of adding a -M MIB-NAME switch in to a service check has dropped the load average from around 1.7 to 0.8 over 15 minutes.

Here’s how to do it:

First, look for any check_snmp plugin which uses an textual OID. Convert this to a numeric OID by using snmptranslate IF-MIB::ifOperStatus -Of. Use the numeric OID shown in place of the textual OID – this will save a few CPU cycles.

Unless you need to translate the returned values back to text – for example, if an enum is returned that needs to be translated in to text – don’t specify ‘-m’ on the command line at all. However, if you do need to translate the returned values, specify -m IF-MIB, or whichever MIB name appears before the :: when translating the textual OID to a numeric OID.

I’m happy, our sysadmin team are happy :)

One wisdom tooth out

I’ve had one of them out (warning: contains graphic images of an extracted tooth).

It really wasn’t painful – the most uncomfortable thing was the injection in the palatal side of the gum, and I heard a noise not dissimilar to the squeezing of a cork in a wine bottle as it came out. One suture – I think – and a bite down on some gauze for a bit, and I’m fine.

I am still a little high on the lidocaine, but that will pass.

If you’re worried about having a wisdom tooth extracted – don’t be. The worst bit is the anticipation!