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:
--with-upstype=apcsmart, --with-upscable=smart
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.
--with-serial-dev=/dev/ttyS0
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:
APC | : | 001,049,1179 |
DATE | : | Thu Sep 18 20:31:51 UTC 2008 |
HOSTNAME | : | jackel |
RELEASE | : | 3.14.3 |
VERSION | : | 3.14.3 (20 January 2008) redhat |
UPSNAME | : | UPS_IDEN |
CABLE | : | Custom Cable Smart |
MODEL | : | Smart-UPS SC420 |
UPSMODE | : | Stand Alone |
STARTTIME | : | Wed Sep 03 19:26:39 UTC 2008 |
STATUS | : | ONLINE |
LINEV | : | 115.9 Volts |
LOADPCT | : | 0.0 Percent Load Capacity |
BCHARGE | : | 100.0 Percent |
TIMELEFT | : | 291.0 Minutes |
MBATTCHG | : | 15 Percent |
MINTIMEL | : | 3 Minutes |
MAXTIME | : | 60 Seconds |
MAXLINEV | : | 116.6 Volts |
MINLINEV | : | 115.9 Volts |
OUTPUTV | : | 115.9 Volts |
SENSE | : | High |
DWAKE | : | 000 Seconds |
DSHUTD | : | 060 Seconds |
DLOWBATT | : | 02 Minutes |
LOTRANS | : | 106.0 Volts |
HITRANS | : | 127.0 Volts |
RETPCT | : | 000.0 Percent |
ALARMDEL | : | 5 seconds |
BATTV | : | 13.6 Volts |
LINEFREQ | : | 60.0 Hz |
LASTXFER | : | Automatic or explicit self test |
NUMXFERS | : | 0 |
TONBATT | : | 0 seconds |
CUMONBATT | : | 0 seconds |
XOFFBATT | : | N/A |
SELFTEST | : | NO |
STESTI | : | 336 |
STATFLAG | : | 0x07000008 Status Flag |
REG1 | : | 0x00 Register 1 |
REG2 | : | 0x00 Register 2 |
REG3 | : | 0x00 Register 3 |
MANDATE | : | 02/12/07 |
SERIALNO | : | 3S0707X00579 |
BATTDATE | : | 02/12/07 |
NOMOUTV | : | 115 Volts |
NOMBATTV | : | 12.0 Volts |
FIRMWARE | : | 725.1.D |
APCMODEL | : | DWD |
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:
BATTERYLEVEL | = | 15 |
MINUTES | = | 5 |
TIMEOUT | = | 0 |
ANNOY | = | 30 |
ANNOYDELAY | = | 15 |
Restart the APCUPSD service by running:
Article ID: 264
Created: January 11, 2009
Last Updated: January 11, 2009
Author: Beth Bartel
Online URL: https://kb.unavco.org/article/how-to-configure-the-back-up-power-supply-software-264.html