Configuring Linux Ubuntu 10.04 LTS for APC UPS Network Shutdown

First I tried installing APC PowerChute 3.0.0 by doing the following

  1. Download Linux installer from http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=SFPCNS300&tab=software
  2. Copy pcns300Linux.tar.gz to /home/<username>. I used WinSCP.
  3. #sudo apt-get install openjdk-6-jre-headless
  4. #cd ~/
  5. #sudo tar -xvf pcns300Linux.tar.gz
  6. #cd Linux
  7. #vim install.sh
  8. search for $LINUX) and Change the next line down from /etc/SuSe-release to /etc/issue
  9. Safe file and exit vim
  10. #sudo sh ./install.sh
  11. Agree to licence agreement
  12. Leave installation path the default
  13. Enter Java path of /usr
  14. Bowser to https://<hostname>:6547/cfgwizard in your web browser and configure to your APC UPS.

But it didnt work very well at all. I had issues on my firewall server because APC PowerChute 3.0.0 uses a custom apache that runs on custom ports but on restart binded to port 80 where varnish is ment to be running! So it caused the public website to go down. I rememebered that I used to use apcupsd along time ago and gave that ago. It turns out it works!!!!

  1. #sudo apt-get install apcupsd
  2. #sudo vim /etc/apcupsd/apcupsd.conf
  3. Add these lines:
    UPSCABLE ether
    UPSTYPE pcnet
    DEVICE ipaddr:username:passphrase
  4. #sudo service apcupsd start
  5. #sudo service apcupsd status

After running the last command you should get some info from your UPS.

tyrone@corfw01:~$ sudo service apcupsd status
APC : 001,050,1266
DATE : Thu Mar 08 18:54:00 EST 2012
HOSTNAME : corfw01
VERSION : 3.14.6 (16 May 2009) debian
UPSNAME : corpus01
CABLE : Ethernet Link
MODEL : PCNET UPS Driver
UPSMODE : Stand Alone
STARTTIME: Thu Mar 08 18:53:29 EST 2012
STATUS : ONLINE
LINEV : 241.9 Volts
LOADPCT : 31.0 Percent Load Capacity
BCHARGE : 100.0 Percent
TIMELEFT : 23.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
MAXLINEV : 241.9 Volts
MINLINEV : 233.2 Volts
OUTPUTV : 242.1 Volts
DWAKE : 000 Seconds
DSHUTD : 020 Seconds
DLOWBATT : 02 Minutes
LOTRANS : 168.0 Volts
HITRANS : 264.0 Volts
RETPCT : 000.0 Percent
ITEMP : 28.0 C Internal
ALARMDEL : 5 seconds
BATTV : 217.0 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Unacceptable line voltage changes
NUMXFERS : 3
XONBATT : Sat Mar 10 08:12:26 EST 2012
TONBATT : 0 seconds
CUMONBATT: 20 seconds
XOFFBATT : Sat Mar 10 08:12:27 EST 2012
SELFTEST : NO
STESTI : 336
STATFLAG : 0x07000008 Status Flag
REG1 : 0x00 Register 1
REG2 : 0x00 Register 2
REG3 : 0x00 Register 3
MANDATE : 12/14/10
SERIALNO : IS123456789
BATTDATE : 12/14/10
NOMOUTV : 240 Volts
NOMBATTV : 192.0 Volts
EXTBATTS : 1
FIRMWARE : 452.18.W
APCMODEL : Smart-UPS RT 6000 RM-1
END APC : Sun Mar 11 01:28:26 EST 2012

Note that I had to change the APC network mangament 2 card’s passprase because the default passprase contains spaces.