You’ve just purchased a UPS and realized that it has no support for your current linux operating system. "Just what am I going to do to power down my server in a power event?" you wondered….
Apcupsd to the rescue
Thanks to the open source community, there is a dependable daemon that runs on your unix based server to monitor events from USB, Serial and even via Network.
This is a nice little script written in perl to monitor incoming signals from your APC device. It even comes with a neat little feature to trigger other Apcupsd on the network for shutdown events.
I’ve integrated this with our SMS machine by adding in a few lines of code allowing it to send off SMS notifications to us in the event of Power failures.
You can download the daemon here.