Thursday, December 22, 2005
Network UPS Tools && Netware
We have a 15KVA MGE Comet S11
providing redundant power to our data centre. Being a big opensource shop
and seeing as MGE support its
development, the Network UPS
Tools project is a natural choice of UPS monitoring software for us.
NUT solves almost all of our UPS problems.
It allows us to monitor the UPS (via its U-Talk serial interface) from a
single machine and control the shutdown of our entire data centre during a
power outage. It has clients for all the
*nix varieties we use (FreeBSD, Linux, Solaris) and there's a Windows client
that lets us shut down Bill's pesky boxes too.
For a long time the thorn in our side has been the three Netware boxes we run. As
there's no NUT client for NetWare, we've had no clean way to shut them down
during a power failure, so they've typically just crashed. This is far from
ideal :(
I was giving this problem some thought again today when I came up with an
interesting realisation. Given that Netware 6.5 ships with a
Perl interpreter, and given the open
nature of NUT's
network protocol, it shouldn't be difficult to hack together a simple,
and perhaps somewhat inefficient, NetWare equivalent of upsmon. A little
bit of extra thought makes one realise that this is true of any platform
that supports Perl.
So I got coding. The result is a very simple Perl program that implements
the minimal functionality of upsmon. That is, it understands that there's
one UPS, and that when it runs out of battery, we should shut down cleanly
before it cuts power. The idea is that it forms a long running Perl process
on your NetWare box and executes a DOWN command when the UPS sends a low
battery indicator. For (pseudo)completeness it also uses the SEND command
to warn users when power fails. You could of course change the commands for
any other Perl platform.
It's not great, and it's not very well tested. It is, however, available to anyone
who's in a similar position and wants to hack around with it. The only
condition is that if you improve it, you let me know — I'd like to
eventually run something like this on our three production boxes.
YMMV and all that.
posted by guy at: 20:28 SAST |
path: /systems |
permanent link
