Category Archives: Geeky

This will be the Geeky Blogs…

Heat waves and computers

I am one of these people that really enjoys the weather of +30 degrees that we’ve been having recently, however today I’m not enjoying it so much. Though it’s not been a great day in terms of organisation on my part, anyway.

So first off, I got up late, by around 45 Minutes, although this didn’t make me late for work, I didn’t arrive when I would normally do so to check everything is running OK before anyone else arrives. When I did arrive, as I walked past the server room I noticed the system fans were unusually loud. I open the door and get hit by around 45 degrees of heat that had been stuffed in there over night, great, this is going to be a wonderful day. Yes we have AirCon, Yes it had died in the night, No I didn’t monitor the temperature (and have no way of monitoring the aircon). I did however, get some odd SMS messages about services flapping this morning, which at the time I just passed off as one of those oddities, that is, until I got to the office.

First things first, get as many of the servers shutdown as we can without stopping everyone from working (this actually turned out to be all of them other than the VOIP Server and switches). With fans all around the server room high up blowing air out of the room and low down pulling air in, windows and doors open around the office it started to cool a little. Unfortunately the aircon maintenance company are busy fixing other peoples aircon units, and don’t know if they’ll get out today or tomorrow, so I need to think what to do with all these servers, I can’t run them in this heat.

Temporary Server stack

Temporary Server stack

Well, There we go, the office boardroom to the rescue, with 2 aircon units in here I stacked the servers up – there’s old Ethernet cables between each server to allow air between them. This is our mail server, and 3 virtual servers, plus our monitoring server (the tower). 2 switches one for internal, one for external, and we’re running again. our file storage is still in the server room and the temperature is at about 31C now and still cooling.

First of all I’m glad I didn’t have to move all the servers, that would have been a huge pain. I am however, glad that we always keep a cold-swap switch in the office, this saved me a lot of time and annoyance. You’ll also notice an Arduino near the keyboard, This has a temperature sensor on it and is wired into the monitoring server and will SMS me if the temperature gets too high. There’s also one of these in the server room, now.

Lesson for today – Monitor your server room temperature, Seriousely!

According to the PDU graphs, the AMPS climbed rapidly from around 8:30PM last night, So I would guess this is when the fans in the systems decided it’s too hot so started turning up more and more.

Here’s a nice graph to show how the temperature has dropped since I put the temperature monitoring in the server room, note the start of this graph is 5 hours after we had been cooling the room with fans, doors & windows. The limiting factor for the server room is 1 door and no windows…

Temp GraphKeep cool people, don’t let the heat get to you, or your devices!


PC Doctor Dave

So, My girlfriend and myself are in the process of moving in together, which is great. My girlfriend runs her own business which does Graphic design, Web design, Web development and App development (Mostly iOS). As she has recently moved from the Isle of Wight, we wanted to get her business listed around the local areas to Pewsey to promote that she is there. The local website is run by a company that repair computers and “do web sites” (shiver). This is not a good thing if you’re in a similar business around Pewsey.

Gemma tries to fill out the form on the site for the listings and this fails, oh dear… next up she tries emailing the address on the website, and that bounces.. hm. O.K. email the maintainer of the site(PC Doctor Dave), the email goes through, Excellent! or so we thought until about 3 hours later when he responded…  Gemma was told that she could not be listed on the site, because she is in direct competition with him…. oh dear, well that’s not good.

By the time I got home from work, Gemma was not in a great mood with this, so I pointed out that there is law against that, the Competition Act 1998, Now, we didn’t want to put Gemmas business in jeopardy, so I come to the rescue. Today I sent an email for listings for Hosting, Web development, Network installation and PC Repair, This is even more in competition with what he does, as I also repair PCs. Fast forward a couple of hours and I get a response, telling me No, I’m not listing you because you’re in competition with me… Great, so not just a grudge against a single person, just anyone that might be a threat to his business. I have responded to PC Doctor Dave pointing him to the 3 sections of the Competition Act 1998 that I could be bothered to find that he is in breach of, there’s probably more of them, but I think 3 will do as a first pass.

I am currently awaiting response from PC Doctor Dave, I have given him until close of business tomorrow to respond before I forward the email to the Office of fair trading and to our local MP in Pewsey. We’ll see which option he chooses.

Using Dyalog APL and a Raspberry Pi to drive a robot – Part 1 (hardware)

Over the past few weeks at work, We have been working with Quick2Wire to build a robot that can be driven from Dyalog APL on a Raspberry Pi. The robot will contain a Raspberry Pi; either a model A or model B will work. We are using a model B as we have them around the office.

You can see the robot in action on the Dyalog CTO blog here:

The Raspberry Pi will be running Raspbian with Dyalog APL 13.2 which will be talking to an Arduino using I2C which will then talk to a motor controller. In this case we are using a L298n motor controller and an Arduino 328 Pro Mini (5v/16Mhz).

Pictures of the Arduino and motor controller are below.

Motor Controller Board

L298n motor controller

Arduino Pro Mini

Arduino Pro Mini

After soldering programming pins to the Arduino, we used an Arduino Uno without a CPU to program the Arduino Pro Mini. To do this you simple wire TX to TX, RX to RX, 5V to 5V, GND to GND and RST to RST (reset), This allows programming of the Arduino Pro Mini without the need for an FTDI cable as we already had an Arduino Uno for prototyping. For simplicity, the Arduino Pro Mini was plugged into a breadboard as there were 4 of them to be programmed.

Programming Arduino

Programming Arduino

Once the Arduino Pro Mini is programmed, the next task is to solder on the wires for power, communicating to the Raspberry Pi and communication to the motor controller. You could choose to use pin headers on the Arduino to plug devices into, I have chosen in this case to solder the wires directly to the Arduino.

Arduino Pro Mini ready to go

Arduino Pro Mini ready to go

From here you should be able to plug the boards together and you’re almost ready to go. Here is our first built up robot.



As you’re able to see here, the Pi has Wifi and we have modified a USB-mini cable to plug into the 5v regulated feed on the motor controller. This had some issues as it turns out the 5v regulator on the motor controller has a 2v drop at around 250mA and the Pi then reboots as the Pi requires around 500mA minimal with 700mA recommended (for non-overclocked Pis). I will address this later in this document.

Here is the wiring diagram for the Arduino.

Arduino Wiring

Arduino Wiring

The 6-pin header will connect to your motor controller, the 2 pin (blue/green) will connect to your Pi, there are 2 wires to connect to the +5v voltage regulator and to the common ground.

Below you can see the same layout with a cut of the Raspberry Pi pins to connect between the Arduino and Raspberry Pi.

Arduino & Raspberry Pi

Arduino & Raspberry Pi

The pins on the Raspberry Pi here are labelled to make life slightly easier.

Due to the voltage regulator on the motor controller board not being powerful enough to power the Raspberry Pi, I am currently using a 5v/3A BEC (Battery Eliminator Circuit). This is simply a 5v power regulator which has been plugged into pins 2 (+5v) and 6 (GND) of the Raspberry Pi. There is also a common ground wired from pin 14 on the Pi. Even with the BEC I am still running the Arduino from the 5v regulator on the motor controller.

Here you can see a top view of the working robot.

DyaBot ready to run

DyaBot ready to run

On the left is the Raspberry Pi, the small board next to the Pi is the Arduino, the red board next to this is our motor controller and above this is the BEC. The thick wires from the motor controller connect to our battery.

Here are the Pin connections to get the robot ready to go.

Raspberry Pi:

Pin 2 – +5v Regulated
Pin 3 – Pin A4 on Arduino
Pin 5 – Pin A5 on Arduino
Pin 6 – GND (common)
Pin 14 – GND (common)


Pin A4 – Pin 3 on Raspberry Pi
Pin A5 – Pin 5 on Raspberry Pi
Pin 3 – IN4 (motor controller)
Pin 4 – IN3 (motor controller)
Pin 5 – ENB (motor controller)
Pin 7 – IN2 (motor controller)
Pin 8 – IN1 (motor controller)
Pin 9 – ENA (motor controller)
VCC – +5v Regulated
GND – GND (common)
Motor Controller:
VMS – Battery input (also connected to VCC on BEC)
GND – GND (common – also connected to battery GND)
5v – N/A

There are also 2 motor connections on the motor controller, you may have to play with the direction of the wires to your motors to have the robot respond correctly and head in the correct direction.

I am currently using an 11.1v 3-cell Li-Po pack, although this is far more power than it requires it does allow me to have the robot running for most of a day without issues. If you chose to run a Li-Po pack, Please be aware of how these packs operate, if mistreated they can expand, catch fire or explode. The safest way to use these packs is a good balance charger and a low voltage warning on the battery balance leads. This will ensure the battery does not get too low.

Quick2Wire are currently working on a new motor controller that will have a higher powered 5v regulator integrated. This will mean we no longer have to use a separate 5v regulator to power the Raspberry Pi.

If you use a different motor controller than the one we are using you will have to check that the connections are correct from the Arduino.

In Part 2 we will go over some of the APL Code, and changes we had to make in order to talk to the I2C bus on the Pi.

Parts used:

Robot Chassis
Motor Controller
Arduino Pro Mini
Raspberry Pi


Nagios check_asterisk_ami

Today I have had a new Nagios plug-in I’ve been working on published. The plug-in is check_asterisk_ami and is capable of checking asterisk VOIP server for number of active calls/channels and also the number of SIP & IAX Peers in use.

The plug-in can be found here:

and any feedback is welcome.

I already have a few people using this with success, Inspiration for this plug-in came from our asterisk system being hacked and calls routed through our server; fortunately I managed to catch it before it got too bad, and this is now on 24hour SMS support.

Playing with Monitoring

Over the years at work I’ve toyed with a few monitoring solutions. It all started with a few issues on the network and Bash scripts to check on them, and notify me via XMPP when there were issues, this grew into something somewhat unmanageable, and eventually I turned to Nagios. I went through and configured a few hosts and services, and wrote an XMPP plug-in (that I’m still yet to publish – and for that matter, finish!) and an SMS plug-in that worked with my VOIP Provider at the office. so now I get full notifications on XMPP and SMS for the more critical systems.

Next Management want to see some nice graphs, so I threw something up with RRD and it was OK, I looked at a few graphing solutions for Nagios, including Cacti, nagiosgrapher, and nagiosgraph, I’ve also looked at swapping out the Nagios install for something else, of which I have tried Groundwork Open Source, Centreon, and more recently thanks to a recommendation, Opsview.

All of these tools appear very good, and are all built around Nagios, but each have their own issues, but also advantages. I’m going to go through a few of them here.


Ok, First up, Pure Nagios, this is configured from text files, and the way you arrange them is really up to you, so for me I had directories of “Servers”, “Development”, “Switches”, etc. within these I had a file for each host, that contained the host information and services associated with it. for me this made it very easy to add a new host as I just created a new file for the host, and added the information. There’s no Web configuration on Nagios (though there are 3rd party ones that I didn’t really look into), and there’s no graphing, without 3rd party apps to do that too, though, there’s nothing wrong with doing one yourself with RRD and linking to the graphs from within Nagios.

Groundwork Open Source

Next I tried Groundwork, This is a very good application, and has a very nice web interface for configuring hosts, including a “Auto Discovery” tool that will go and find all hosts within a range of IP address’s, Limitations of this are that it only does IPv4 address’s, though at least it gives you a start point on your network. Adding hosts and services on this is manually also very easy, it sets a few graphs up for you, and creating more or customizing the graphs is also very easy. Unfortunately, it seems the Groundwork team are not doing any work on their Open-Source version anymore, which is a little disheartening as they’re using Open-Source software under the hood to do most of it, it’s also very heavily orientated with Java, and requires a bit of CPU grunt to do a lot of the processing.


Next I tried Centreon, again this is a very good tool, with very nice web GUI for configuring hosts, it lacks an Auto-Discovery, but it does allow you to import your configuration from Nagios, and for me that worked perfectly, I didn’t have to configure much outside of that other than the graphing data. Adding new hosts and services is very easy with the web GUI, and Nagios is still accessible along-side Centreon so you can still access the views that Nagios has should you wish to. The downside I have found with Centreon is the graphing data. For the most part, ping times, etc it’s absolutely fine, however, when it comes to network traffic, that’s a whole different ball-game, Here’s what it does with Network Statistics.


As you can see, that’s not the most useful data one could get. this is due to settings within RRD tool, and I have not managed to yet find out a way to change this within Centreon, Keep in mind, I don’t want to change scripts, this should be do able from within the web interface. MRTG is very good at these, and I don’t mind plugging the MRTG graphs into this, however, it would be nice if there was a single point to get all of this data. The graphs that are in-place also appear to show far more information than they need to, and again I’ve not yet worked out how to solve this. Everything else works well, but the graphing seems to feel somewhat unfinished.


The last few days I’ve been playing with Opsview thanks to a recommendation from a fellow geek. The first stumble I hit was the fact that in Nagios I’m monitoring upwards of 100 hosts and around 1500 services including CPU Load, Memory usage, HTTP Response times, etc, each network service is on both IPv4 and IPv6, and the entire config can be a bit of a nightmare. Opsview does have a tool to import Nagios configurations, however, this was not easy, it complained about custom plug-ins that I have written and it didn’t know about, easy fix for that, just copy them in-place, it complained about a few other things, too, and eventually I bailed out of doing this and just started to add hosts manually. Opsview have taken a very different approach to your plug-ins or commands, instead of having a service, that points to a command, that points to the actual script, you have a service that points to the script with the arguments assigned, well, I use things like $USER7$ for my SNMP Community, could I work out where you can set these? no. it also means you can’t have say a single command with 2 services assigned for things like “local-ping” and “long-distance-ping”, though you can still do this, it’s a different way of doing it, and this is what broke a lot of my Nagios importing, and why I took the Manual route. It does make sense the way they’ve chosen to do it, it’s just a knot in the head when you’re used to the other way. As for the Graphing, it plugs into MRTG for the network interface stats, which is good, though currently mine is saying “No Data” – I’ll look into this at some point, I know how to configure MRTG, so it might involve a small amount of tinkering under the hood, the rest of the graphs are great, clean and tidy, only display the information that you want, and does what it says on the tin. Other than the learning curve of differences and things that are not quite working out of the box (MRTG) it’s looking good. I’ll stick with it for a while and see if I can make sense of the broken bits. I also need to import my XMPP and SMS notification scripts, this should be fun, as the notification system is rather different too, I’ll have to do some working out on this.


The conclusion I’ve come up with, is Nagios is very very good at monitoring your network, it does exactly what you tell it to do, but if you want easier configurations, graphing, etc, there’s a lot of options, and I’m still yet to find one that ticks all the boxes, Hopefully once I’ve configured Opsview a little more it will tick those missing boxes. Groundwork did in-fact tick all the boxes, but the fact that they’re not publishing the Open-Source version anymore bothers me. I understand companies have to make money, and I’m happy to support them, but don’t call yourself “Open-Source” when you’re not.

Hopefully with Opsview, other than the initial configuration of devices, the search will be over, Maybe I’m just attacking it wrong and should have Nagios for the monitoring and something else for the graphing (Cacti?) and leave it be, let each do their own job, We’ll see when I’ve played with Opsview a little more.

I Hate RPM!

I really really hate RPM Based systems, I cringe every time I step near one. Granted, no where near as much as I do every time I use a windows system, but it pains me more and more every time. First of all, I feel for anyone coming from windows that thinks they wish to try Linux, and decides “Redhat is the way to go” because that’s what business’s use. it’s wrong, Please don’t do it, pick something like ubuntu, mint, or almost anything based on Debian (even Debian itself is quite friendly in my opinion). Business’s use Redhat because there’s a support contract and they can get bugs fixed fast, that’s the only reason I can see.

So, on to my rant about RPM systems, why do I hate them? Well, I run monitoring software called Nagios, this has a remote package called NRPE, this allows me to run scripts on remote systems for monitoring and works very well. This package is found in the repository called “EPEL” (Extra Packages for Enterprise Linux) hosted by the folks at Fedora.

I am unable to update my system because RPM system is broken. I commonly have an issue with installing something like webmin on a fresh Debian install, it would be nice if it was a little better, but it’s ok, I do the following:

dpkg -i install webmin*.deb

This results in an error that I do not have packages installed that it requires, no problem, the following command is what I want (and it tells me!)

apt-get install -f

This downloads and installs the packages required, and then installs my webmin package, great.

Now, lets see about RHEL, we have YUM, ok, I want to update my system, so I run “yum update” this chugs away and eventually comes back with:

Error: Missing Dependency: nagios-plugins = 1.4.15-2.el5 is needed by package nagios-plugins-disk
Error: Missing Dependency: nagios-plugins = 1.4.15-2.el5 is needed by package nagios-plugins-load
Error: Missing Dependency: nagios-plugins = 1.4.15-2.el5 is needed by package nagios-plugins-users
Error: Missing Dependency: nagios-plugins = 1.4.15-2.el5 is needed by package nagios-plugins-procs

Here, I grumble. but ok, quick search for nagios-plugins 1.4.15-2.el5 on google and I find the package, but interestingly the package I downloaded was from the EPEL repository, so, it’s there! why did it not find it? Anyway, ignoring that issue, I try installing it, I alerady have an older nagios-plugins installed, so I run the following:

rpm -Uvh nagios-plugins-1.4.15-2.el5.x86_64.rpm

This results in the following:

nagios-common is needed by nagios-plugins-1.4.15-2.el5.x86_64

Was it not by the older package? or does it mean I have an older version? who knows. Anyway, I run “yum install nagios-common” and that’s now installed, from EPEL, great. So we try rpm -Uvh nagios-plugins-1.4.15-2.el5.x86_64.rpm again, and this time I get the follwing:

error: Failed dependencies:
nagios-plugins = 1.4.13-11.el5 is needed by (installed) nagios-plugins-disk-1.4.13-11.el5.x86_64
nagios-plugins = 1.4.13-11.el5 is needed by (installed) nagios-plugins-load-1.4.13-11.el5.x86_64
nagios-plugins = 1.4.13-11.el5 is needed by (installed) nagios-plugins-users-1.4.13-11.el5.x86_64
nagios-plugins = 1.4.13-11.el5 is needed by (installed) nagios-plugins-procs-1.4.13-11.el5.x86_64

But, wait I was trying to update those packages, it just couldn’t find the one I’m trying to install here. Despite it being in the same place in the repositories! By this time I can feel my blood pressure starting to rise, which is never a good thing. I also keep saying to myself “on Debian, I just run apt-get install … and it does it” anyway, I have to run RHEL for work purposes, all my servers at work are actually running Debian, however, for building we run RHEL to be “compatible” with our customers. Except, we can’t be because it won’t update! So now I have to download the other packages manually, and install them, manually, because it can’t find them.

I’m starting to get annoyed with this, and if it was my own system that I did not need for work, it would have been changed to Debian long ago.

All I can say, is that I feel for anyone that “Tries” Linux and goes for an RPM solution. This is not the first time I have had this issue, and I have even had the issue within the main repositories with packages. It’s annoying, It’s frustrating, and I can’t get rid of it. I just HATE it!

Given a choice of package managers, I would opt for Portage followed by Apt, both are incredibly good and I have very few issues with them.

A lot of memory…

Well, apparently 2GB isn’t enough memory anymore, with Windows wanting at least 4GB to run well, linux is still happy with 128MB, but with compiz you really want 4GB again.

When it comes to servers however, it’s a whole new ballpark. The software written by the company I work for deals with incredibly large computational arrays requiring a fair amount if memory at times. While I write this I am waiting for a pre-boot memory check to complete do I can get on and check the system is working, it’s taking a while, and here’s a extensor as to why…


That’s 96GB Memory in this system, What’s even more interesting about a system with this much memory, is that it will be used. and this is not a virtualised system, this is a single OS (though dual-boot) and is used for testing…. oh yeah, not to mention the fact that it has 2 quad-core CPU’s…. this system really is a beast. and I would quite like it to be my desktop machine, though, I might have to invest in some ear protectors, as the cooling is rather loud :-)

Bored of Internet idiocy…

Right, I haven’t posted for a while mostly because I’ve been busy with work, social life and moving house, however I’m completely fedup with the idiocy from some ISP’s, media, and people.

IANA have handed out the last /8′s of IPv4. and it couldn’t come sooner in my opinion. I’ve been using IPv6 for many years now, have IPv6 when I’m at home, this is native. I have it at work, this is currently tunnelled, but only because of Mikrotik ROS not supporting native IPv6 over PPPoE on 4.x builds. I even have it on my laptop when I’m sat in a pub. I have helped friends and family get IPv6, and everything on it just works.

Why is it, then, that ISP’s “have no plans” to implement IPv6 still. stop complaining that IPv4′s have run out and you don’t know what to do, IPv6 has been around since 1996, it works well and I have systems that _only_ have IPv6 address’s. Don’t use “there’s no routers on the market that do it” because there is. Billion have one, ZyXEL have one, Comtrend have one. they’re all priced at or under £50. what’s not consumer about them? if you want more, then OpenWRT and DD-WRT DO have IPv6 support, and can be flashed onto many routers, if you want to put the boat out a little, Cisco support IPv6, as do Routerboard.

it is of my opinion that there is absolutely no excuse for not offering IPv6 to consumers, if the consumers don’t want to use it, that’s up to them. Ipv4 is LEGACY it is the OLD Internet. IPv6 is the CURRENTLY used Internet Protocol. so, come-on people, pull your fingers out and get it done. I will not be buying any devices that do not support IPv6 anymore. this includes Routers, VOIP Phones, Printers and even Set-Top Boxes – yes, they have ethernet for their “Interactive” services. if they don’t do IPv6, they will not be used.

For now, back to work…

Windows XP x64 is not a Windows operating system….

Well, one of the office machines has just has a new hard disk installed, so clean install of Windows XP x64, and start running updates. you now get this “Browser choice” thing on your desktop (which is frustrating when you’ve been using a machine for years and it suddenly pops up, but anyway…) for this system, we’ll be using IE8, well. That’s what I hoped anyway. However, Microsoft appear to fail to accept that Windows XP x64 Professional is actually a windows operating system.

Here’s a screenshot of what I got when I tried to put IE8 on the system:


If Microsoft don’t class Windows XP x64 as a Windows Operating system, should everyone else do the same?
well, I guess we’ll use a standards-compliant browser instead on this system… now, where can I get one of those :-)

Supplying customers with what they want.

A few months ago, I asked an internet provider,Timico, with which I have a co-location server with if they would supply IPv6 on their network. They told me there were currently no plans to implement it. OK, fine, I’ll use another method, Tunnelling. This is fine, there was a way around the problem, and everything worked fine.

Today, however there was a BBC Article explaining that IPv4 was going to run out soon. well, this isn’t news to me, but reading further into the article, there was news. From the BBC Article: “Unless more ISPs and others start to adopt IPv6 those delays could start to hit general web browsing, fears Mr Davies.” Now. Mr. Davies is Trefor Davies, the Technical Director for Timico. Hold on a moment. Timico told me they had no plans for IPv6. so what’s he talking about?

I have done a small amount of digging, and on Trefor’s personal blog, on the 25th February (only a few weeks after I was told that there were no plans to implement) he said that IPv6 is almost running on the Timico core network. So, why is it not available to their customers, and why have they delayed it this much. I have been using IPv6 for some time now, long before my blog stream started. To start with it was Tunnelled and now I have Native at home, though I’m still Tunnelled at the office, mostly due to some firewall restrictions.

Anyway, My problem with this is that Trefor is quoted saying that people need to move to IPv6, well, they do, but why should he be saying this when the ISP that he is a director of, does not offer it to their customers. My Chosen ISP at home (AAISP) does offer IPv6, they also offer it tunnelled or native, and have done so for a very long time. I have emailed Trefor, and Hopefully he can let in some light about his comments and why he thinks he should be able to say what people should be using when he doesn’t offer what he says they should.

possible updates depending on Trefors response. :-)