For the last few months, our office building has been doing a lot of generator testing and sometimes these tests went out of schedule. We began to worry about the office servers, as constant power failures may cause data corruptions although we use reiserfs for all of the disks.

My colleague and I look for good UPSes, and found out that APC’s UPSes work very well for Linux machines. After some price and Linux research, we decided to buy some APC Back-UPS CS 650. These models are not intended to be used by high-end server products but since we only have some clone machines as servers, a couple of HP Proliant DL140, and a DELL PowerEdge 1425SC there shouldn’t be much problem.

We bought 7 units of them from Startec in Low Yat, for RM320 each. We took a few hours last Saturday to install them and rearrange our servers. 4 of them are placed inside the server rack:

4 UPSes - 3 x HP Proliant DL140, 1 x DELL PowerEdge 1425SC

On the server side, we install Debian’s package apcupsd, and on the monitoring server (with Apache) we installed apcupsd-cgi. To make it work, /etc/apcupsd/apcupsd.conf are edited with the following lines modified:


Our UPS came with USB cables, different cables requires different configuration line for CABLETYPE. Don’t worry the explanations in the configuration files are very good.

Next, a couple of tests were done with apcupsd to make sure the servers behave well in case of power failures. When we are satisfied, the monitoring part is easy enough – add the monitored hosts inside /etc/apcupsd/hosts.conf. Here’s a snapshot of the monitoring page: