How to configure the back-up power supply software
Configuring the Back-UP Power Supply software APCUPSD on a Linux box
Back-Up Power supplies can be controlled with the APCUPSD software. The following outlines how to download the source code for APCUSPD, compile and install it, and test that APCUPSD is working properly. You can find more information about and APCUPSD at http://www.apcupsd.com. The following instructions pertain to the APCUPSD version 3.14.3. Upon downloading the linked file place it in /etc/usr/. Once there you will have to unzipp it and then untar it. You can do this by running a single command in the directory where you placed apcupsd-3.14.3.tar.gz:
This command will uncompress the tar file into a directory called apcupsd-3.14.3. A benefit of compiling your own version of APCUPSD is that you don’t need to hunt for precompiled versions of your software that will work with the particular kernel you have running.
In order to compile anything on your system you will need to have Developing tools installed.
To begin the compilation of APCUPSD, run the following commands from the apcupsd directory:
Several flags in the first command pertain to the type of APC you have and how it will be connected to your system:
to specify the values of these flags you will need to know the type of APC you have and the type of serial cable that runs from the APC to the back of your computer.
here ttyS0 pertains to the serial port where your APC will connect to your system.
After running the make install command your APCUPSD software should be installed and ready to test. Plug your system into the back of the APC and connect the serial cable from the APC to the back of the computer, then power up your system. At the command prompt you can now run several commands to test that everything is working properly. First run the following command:
If the software is running properly you should see the following:
|DATE||:||Thu Sep 18 20:31:51 UTC 2008|
|VERSION||:||3.14.3 (20 January 2008) redhat|
|CABLE||:||Custom Cable Smart|
|STARTTIME||:||Wed Sep 03 19:26:39 UTC 2008|
|LOADPCT||:||0.0 Percent Load Capacity|
|LASTXFER||:||Automatic or explicit self test|
|STATFLAG||:||0x07000008 Status Flag|
|REG1||:||0x00 Register 1|
|REG2||:||0x00 Register 2|
|REG3||:||0x00 Register 3|
|END APC||:||Thu Sep 18 20:32:30 UTC 2008|
For another test, run the command:
and then immediatley run the following command to check the log files:
The above output is a good sign your APCUPSD software is able to shut itself down and restart. While you have this file open you can also pull the serial cable connected to the back of the computer to check that the computer will complain about losing its connection to the APC.
We recommend editting various settings in /etc/apcupsd/apcupsd.conf; change the values of BATTERYLEVEL, MINUTES, TIMEOUT, ANNOY, and ANNOYDELAY to the following values:
Restart the APCUPSD service by running: