Posted by simms on Wed 1 Jun 2005 at 14:17
Having set up a reliable Debian `sarge' server in a production environment, I'm now eliminating any potential obstacles to running it on a round-the-clock basis. Inevitably, this has led me to hook up the machine to an uninterruptible power supply (UPS) unit, and though this alone should be enough to keep the machine running through minor power outages and line problems, it would definitely be better if the box were aware of the UPS' state, so that graceful shutdowns could be performed, at the very least.
The UPS in question is an APC Back-UPS 650, and it's connected to my Debian box via a standard 9-pin serial cable on ttyS0 (a.k.a. COM1).
Looking at the range of Debian packages available for UPS monitoring, I see nut, apcd, upsd, powstatd, and so on.
It's difficult to tell which of these is the smart way to go: nut seems to have the best reputation, but it looks like overkill, since it was designed with a whole network of UPS-dependent boxes in mind; apcd seems right for the job, but it's not very well-documented.
The others I've never even heard of.
Given the simplicity of the setup (a single machine connected to a very common UPS model in the simplest possible way), I figure that there must be a straight-forward way to get this done with maybe one package and a few lines of configuration.
Does anyone here have a method they could recommend? K.I.S.S., please :)
This article can be found online at the Debian Administration website at the following bookmarkable URL:
This article is copyright 2005 simms - please ask for permission to republish or translate.