[ Home page ]
This one-day hack is a simple UPS daemon for APC BackUPS Pros, and possibly other APC devices. The daemon monitors the UPS. If it detects an on-battery condition, it will notify all users regularly. If it detects a low battery condition it will initiate a UPS shutdown, and then shutdown the machine.
There are a handful of other UPS daemons out there, most notably NUT. I wrote this because none of them did exactly what I wanted, and I wanted full control over how it behaves when on battery. The result is a perl script with less than 200 lines of code, fully configurable by editing the right bits.
Download upsd. Read it and edit as appropriate. Run it.
This daemon assumes that your UPS is connected via a 940-0024C cable. Unfortunately, this is not what our BackUPS Pro 420 came with and I had to make one. The nice NUT people have a wiring diagram for this cable. While you're over there, you might like to check out their UPS daemon as it is more fully featured and better supported that this one. I can't remember what our cable is - possibly a 940-0024B - if anyone figures out what is required to make that cable go I would be very interested to hear.
None. I wrote this to do a particular job, which it does. I've put it on a webpage because others have expressed an interest in seeing the code. I'm not interested in developing it any further. If you wish to, or find any bugs, I'll be interested to hear.
Paul Warren 13/09/2000