Knowledge Base

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:

[root@hostname]# tar -zxvf 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:

[root@hostname]# ./configure --enable-apcsmart --enable-nis --enable-pthreads --with-upstype=apcsmart --with-upscable=smart --with-serial-dev=/dev/ttyS0 --with-nis-port=3551 --with-nisip=
[root@hostname]# make
[root@hostname]# make install

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.


  • 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:

[root@hostname]# apcaccess status

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
CABLE : Custom Cable Smart
MODEL : Smart-UPS SC420
UPSMODE : Stand Alone
STARTTIME : Wed Sep 03 19:26:39 UTC 2008
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
TONBATT : 0 seconds
CUMONBATT : 0 seconds
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
END APC : Thu Sep 18 20:32:30 UTC 2008

For another test, run the command:

[root@hostname]# service apcupsd restart

and then immediatley run the following command to check the log files:

[root@kwji apcupsd-3.14.3]# tail -f /var/log/messages
Sep 18 21:11:41 jackel apcupsd[1196]: apcupsd exiting, signal 15
Sep 18 21:11:41 jackel apcupsd[1196]: apcupsd shutdown succeeded
Sep 18 21:12:09 jackel apcupsd[1941]: apcupsd 3.14.3 (20 January 2008) redhat startup succeeded
Sep 18 21:12:10 jackel apcupsd[1941]: NIS server startup succeeded

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:

ANNOY = 30

Restart the APCUPSD service by running:

[root@hostname]# service apcupsd restart
Attached Files (1)
There are no comments for this article. Be the first to post a comment.
Security Code Security Code
Related Articles RSS Feed
How to configure the time and NTP on a Linux system
Viewed 2551 times since Fri, Dec 12, 2008
How to configure Fedora services on UNAVCO field computers
Viewed 1783 times since Sat, Nov 8, 2008
How to securely network a Fedora Linux system
Viewed 1679 times since Fri, Dec 12, 2008

Last modified: Monday, 12-May-2014 00:18:29 UTC