Skip to main content


Showing posts from 2011

The Perils of CDNs

So CERN have just held a popular webcast event to announce the latest results in the search for the Higgs. Many of the webcast viewers (no I don't have usage stats) were complaining that the stream was choppy. What I did notice on my laptop (couldn't get near the auditorium) was that the main libflashplayer traffic was inbound from VELOCIX-EU - could this be the CDN used by Groovy Gecko?

Not having an onsite mirror though then meant that each member of staff watching was then pulling data *in* to site as the traffic graph shows:

I'm sure this can't be efficient... Ho Hum.

Another year of LHC Secrecy

So, another year of LHC running comes to a successful close, Once again we've managed to keep the real facts hidden from everyone - Not the Higgs (as thats's being discussed next week) but more importantlt that the whole of the LHC is actually a spinoff from one of the major Data Centre companies who had outgrown their shed. The Proof? why - of course...

however, best to keep it a secret - its easier to get runding for a mythical 27km tunnel than a shed :-) Oh, and a lot less sexy in the books too...


Updated to include the plots from monitoring box:

FTTH update

So, I'm still (till I move flat) with k-net at the flat, and have a monitoring whitebox hanging off my router.
So Far, speed has been consistenly high - downloads in the 90Mb/s range. They are only (heh, 'only') seeing uploads of ~30Mb/s, but I know I can get higher than that using a box closer to the reso-lian network or to work.
Sniff, anyway thats only till the end of the month and then I'm back to till May. Somehow I don't think I'll be getting this off my ADSL line...

PoE Network controlled signage

I may have a requirement for several 'remote controlled' illuminated signs. (where remote could be network driven) - These aren't Scrolling LED 'calls in queue' type ones, but more the warning 'Laser on', 'Mic Live', 'Conveyor Running' type ones.

Normally these things seem to be driven directly from some local switchgear or output, but what if you want to gather status centrally , or illuminate the sign depending on some remote sensor (be it a web tsunami alert or the boss' car being picked up on the ANPR at the gate)

Cue a quick hacky prototype: Take one nanode and use the digital outputs to drive a mosfet to switch some cheap LED strips from IKEA. So far so good, but that requires a 12v (since thats what the strips use) supply. The nanode can take that on the screw inputs if you add a heatsink to the reguator, but I'd rather get rid of the PSU alltogether: cue a cheapo 802.3af PoE splitter from TP-Link, and I have the whole lot dri…

puppet /. facter / v12n

As I'm starting to get into puppet, especially when used with the foreman for dashboard display, I've started noticing a few (fixable) oddities

1st up ios that not all RHEL clones are treated equally -- some patches are just adding detection and flaggin, others go the full hog and make sure its in all the "constrain:" sections in facter too. I guess I need to do a code review and pull in the extras. Cue lots of different VMs
(the joys of a weeks home leave from work..)

secondly, virtualisation detection is 'flakey' -- some (vmware) are really well detected, but new kernels give false positives (see issue #7723) so I'm going to set about tidying these up and adding hyper-V detection properly

FTTH / Reso-LIAIN / K-Net

Executive Summary:
I've had fibre installed to the flat. In this area it's all organised by Reso-LIAin who have 'local' ISPs who resell their network. Luckily for me one of the PoPs is located at work so I have nice small (<2ms) pings to site.

So what's involved? Choose your ISP from the shortlist (of about 5) -- all roughly the same prices, some offering more bundled stuff at cost. I ended up with 'k-net' (formerly known as They seem to be rather dependent on one supplier if you look at their AS24904. Contractors from reso-lian show up to pull the fibres into your property -- In my case they'd already run multicore into the building (1st and 3rd floors had breakout boxes installed) and I was the first to get it from there. They pull (through the france telecom duct -- which should be installed anyway) a 2-core fibre and terminate it at the CPE (which must be powered, so you have to define a location within reach of a wall-wart. They wil…

Shuttle bus tracker

Not that I tend to err, leave things till last possible minute or anything, but I'd really like to have a tracking system on the CERN shuttle busses, so that I can stay in the office until I know the bus is coming. (or, armed with a mobile device waiting at the stop, see where it is)

So - I was thinking something embedded ish that contained a cheapo GPS chipset (probably good enough signal on the dasboard, a 2 line LCD and a keypad

something UI ish for driver along the lines of 'select route:'
and then it'd show the route, upcoming timetabled stops

backhaul to site would be GSM (should be able to transmit a small UDP packet of transponder#,Route#,Position,timestamp) to a central server.

The folks over at (yes, they started concerto too) already have some code that looks interesting at

Question is, would it be cost effective to roll our own, and if not, who's offering the best / cheapest (open) system out there?

nanode built!

One successful evening of soldering, and lo, I have a working nanode. Started off nice n basic with the resistors, but overall a pretty simple pcb to assemble:

Plugged it in, and lo, blinky LED. Have since flashed with the EtherShield Drivers and its happily getting an IP address. now for some pachube / twitter / other integration...

Orange VoIP woes

Our livebox2 repeatedly used to lose the VoIP service (somewhat annoying as we don't have a 'physical' pots line, just ADSL signal on the copper pair)

however there's now a subtle hint on the config pages NOT to change the DNS servers from the automatic setting (we used to use opendns for content filtering)

So, anyone know what hard-coded voodoo sagem/orange were up to?

Electronic components

Vigilant readers (ha, who am I kidding) will have noticed I've been starting on some ATmega hackery, but I'd like to prototype up without needing to but an arduino (clone) card for each one. So, off to the electronics equivalent Laminated Book Of Dreams (ie, farnell) to stock up on core components.

Discussions have come up with something like the following list, but what else should be added?

* LEDs - Was going to get both a selection single and a couple of RGB ones
* pile of resistors
* capacitors - elecrolytic and ceramic
* Diodes - signal. power, zener
* Voltage regulators
* 2n7000 mosfets
* generic transistors
* couple of atmega chips, crystals etc (core componets of arduinos)
* battery holders
* reset switches
* hookup wire
* breadboard (one decent and one small)

More specific bits I also want are
* rf12 boards
* opto isolator for telemetry input
* moar jeenodes :-)

EDF metering and 'Tele-Info'

Just discovered via some google-fu that we have a Sagem C1000 series meter in the house, which includes

* Interface de télé-information client permettant le raccordement à un système de gestion d'énergie

so, with a bit more googling I discovered that it's 1200 baud, 7 bits one stop. and lo - there's even an arduino shield already made for it!

--- update ---
Have discovered that there are many hacks around to parse this teleinfo - some of which need a licence fee (!!!) and do fancy things like export to

Sample of the data stream is at

Nasa TV on PS3

Since there's no european satellite stream of Nasa TV it means you have to watch a streamed version over here.

Also I'd like to watch it *on the TV* when there's something interesting, rather than a PC. so, with a bit of hackery contains just the swf embed object (no extra junk) scaled to 720p size.

Opening the link in the PS3 web browser and clicking the 'fullscreen' bottom RH corner means you get a nice fullscreen flash stream on your TV :-)

share and enjoy.

email clients

Came across this posting recently. Oh that the following recommendations were actually implemented somewhere...

But let me suggest a few pop-up windows I would like to see
mail-programs implement whenever people send or reply to email
to the lists they want me to subscribe to:
+------------------------------------------------------------+ | Your email is about to be sent to several hundred thousand | | people, who will have to spend at least 10 seconds reading | | it before they can decide if it is interesting. At least | | two man-weeks will be spent reading your email. Many of | | the recipients will have to pay to download your email. | | | | Are you absolutely sure that your email is of sufficient | | importance to bother all these people ? | | | | [YES] [REVISE] [CANCEL] | +-----------------…

git import

I had a set of old files with the correct timestamp on, relating to separate versions of a file, ie, foo_16.c, foo_17.c, ... foo_22.c which I wanted to import into a new git repo while preserving the author history

so, this little snippet of code worked - may be useful for others

$ git init
$ git add -N foo.c
$ for i in `seq 16 22` ; do
cp -p hist/foo_$i.c foo.c;
GIT_COMMITTER_DATE="`date -R -r foo.c`" git commit \
--author "Fred Bloggs <>" \
--date="`date -R -r foo.c`" -m "Version $i" foo.c

which you can then branch and commit as normal with current changes

Yes I could probably have done GIT_AUTHOR_DATE=$GIT_COMMITTER_DATE but well, 2 calls to date wasn't that much of an overhead in this case.

anyway, for those that care, the result is up on github

Bash, PS1, PROMPT_COMMAND and other fun

I've just spent 30 mins trying to understand the flow between the various files that set a bash prompt on fedora to do the following: (assumption is here that you're in a colour xterm)

I want:
* my username to change colour depending if I still have a valid kerberos token
* the hostname of the machine I'm on to be in RED if I'm root
* displayed path to be as simple as possible
* $ if I'm a minion, # if root as mormal
* command line editing to work sensibly, no wierdisms on wrapping long lines

so - I used to have on my machine something like the following:
if [ "$PS1" != "" ] ; then
klist -s
if [ $? -eq 0 ] ; then
PS1='\[\033[32m\]\u@\h\[\033[0m\]:\w\$ '
PS1='\[\033[36m\]\u\[\033[32m\]@\h\[\033[0m\]:\w\$ '
and something similar for root.

But on my laptop (F14) I wanted it system wide, so went down the approach of customising /etc/bashrc where you find calls to

1) /etc/sysconfig/bash-…

Garbage in, Garbage out

Why you should not accept data from users into a DB without checking it.

Exhibit A: "select manufacturer"







Makefile Faffage

I've inherited a piece of legacy code (an inirscript that needed bringing up to FHS and Fedora packaging guidelines) -- as part of the testing I realised I needed a noddy way to generate the tar.gz sources. There was already a Makefile in the package (for ETICS) but I hacked in the following to quickly build up a NVR-tarfile.

Not pretty, but if anyone fancies some Makefile golf, I'm open to suggestions:

echo ${package}-`sed \
-e '/^Version:/!d' \
-e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
-e q \
${package}.spec` > .fname
-rm -rf `cat .fname`
cp -lvr src/ `cat .fname`
tar chzf `cat .fname`.tar.gz `cat .fname`
-rm -rf `cat .fname` .fname

and yes, it bears a striking resemblance to the GNU Complex Makefile Example

QSL Cards

At the shack there are thousands of QSL cards stuffed into boxes. As an experiment I decided to see if there was a quick way of scanning these - so using a webcam to capture a still image, followed by a python script to stitch the 2 adjacent images together (as the front and back will be on 2 separate images) I managed 400 or so in a session.

stuffed up on flickr for now till I get round to finding a better place for em.

oh the script? it's my 1st adventure into the Python Imaging Library -- and its rather nice.


# Script to generate a single image of a QSL card from 2 adjacent
# scanned images
# Andrew Elwell for F6KAR
# This script may be copied or modified under the terms of the GPL
# We assume that the cards are arranged with the following seq:
# [- 1F] [1R 2F] [2R 3F] .... where FR are Front and Rear of cards

from PIL import Image
import os

indir = "/home/aelwell/Downloads/qsl/batch2"
outdir = "out/"

#leftbox = (100,100,900,1200)
leftbox = (0,0,750,1…


Yay. So tibbs has taken up the challenge and become my sponsor for Fedora. So far I've got libfap built in koji, just working out the ins and outs of Bodhi, and we're good for multiple platform / arch builds. Seems rather simple compared to some other buildsystems I'm using :-)

Anyway, lets see if planet.fp.o picks up on the Fedora tag correctly