Batteries

Battery Problems

If you have your UPS long enough, you will probably have battery problems. Here is what John Walker has to say about APC UPS batteries:

I thought I'd pass on some information I've obtained which you'll probably eventually need. Besides, by writing it down I'll be able to find it the next time.

I started installing mine in 1995-1996. Lead-acid batteries have a finite life even if not subjected to deep discharge cycles. For the batteries used by APC, this is typically four to six years. As part of the self-test cycle, the UPS measures the voltage of the battery at full charge (which falls as the battery ages), and if it's below about 90% of the value for a new battery, it sets off the "Replace battery" alarm, which it repeats every day. [on apcupsd versions prior to 3.8.0, this message is sent once, on version 3.8.0, it is sent every 9 hours - KES].

You will occasionally get a false alarm. It's a good idea if you get an alarm to repeat the self-test the next day and see if the alarm goes away. If the alarm is persistent, you need to replace the batteries, which can be done without powering down the UPS or load-you just open up the battery door, take out the old batteries, and hook up the new ones.

APC makes "Replacement Battery Units" for each of the SmartUPS models, but by a

Another important step is to find a way to shutdown Computer B when UPS 2's battery is low. Probably the simplest way to do this is to edit $HOME/apcupsd/bin/apcupsd.conf on Computer A so that this second copy of apcupsd becomes a network master. Then install a standard slave configuration on Computer B.

Please remember that if UPS 1's batteries are exhausted before UPS 2's batteries, Computer B may not be properly shutdown. Thus there are certain risks in such a configuration. That said, these configurations can be very useful for powering electronic equipment and such. ./usr/share/doc/apcupsd/manual/kernel_config.html0100644000000000000000000000651007364101706021007 0ustar rootroot Configuring a Kernel for USB Support

Configuring a Kernel for USB Support

General

Apcupsd version 3.9.x (development version to be released as 3.10.1) provides support for USB UPSes on Linux systems. However at this time (August 2001) Linux kernels do not yet support the HIDDEV device that is used by apcupsd. If you have a kernel version 2.4.5 or later and you apply the appropriate Alan Cox patch, you will be able to enable USB support in apcupsd.

For kernel 2.4.5, you need patch ac12 or later. For later versions of the kernel, any ac patch should work.

Downloading

The currently released kernel is version 2.4.7, which I tested and found to work, but had problems with Samba NMB services. If you don't need the most recent kernel, I recommend version 2.4.5. You can obtain the 2.4 kernels from: http://www.kernel.org/pub/linux/kernel/v2.4/.

You can obtain the Allen Cox patches from: http://www.kernel.org/pub/linux/kernel/people/alan/2.4/

Building the Kernel

I provide here only a very brief explanation of the steps necessary to build your kernel.
 1. Download kernel from:
    http://www.kernel.org/pub/linux/kernel/v2.4/
    (I assume you get linux-2.4.5.tar.gz and that
     you put it into /usr/src)

 2. Download Alan Cox patch from:
    http://www.kernel.org/pub/linux/kernel/people/alan/2.4/
    (I assume you get patch-2.4.5-ac12.gz and that you
     put it into /usr/src)

 3. su root

 4. cd /usr/src

 5. Ensure that the directory linux does not exist,
    or if it is linked, remove the link or change the
    name.

 6. Unpack the kernel with:

    tar xvfz linux-2.4.5.tar.gz                 

 7. Unpack the patch with:

    gunzip patch-2.4.5-ac12.gz

 8. Move the kernel source into a different directory:

    mv linux linux-2.4.5
	
	or
	
	mv linux linux-2.4.5-ac12
 
 9. cd linux-2.4.5

10. Apply the patch with:

    patch -p1 <../patch-2.4.5-ac12

    There should be no errors.

11. make mrproper

12. Find a valid configuration file, and
    make sure it has the following configuration
	statements. If not, please add them:
	
    CONFIG_USB=m
    CONFIG_USB_LONG_TIMEOUT=y
    CONFIG_USB_LARGE_CONFIG=y
    CONFIG_USB_HID=m
    CONFIG_USB_HIDDEV=m

13. make menuconfig  or   make xconfig (if you are running X)
    load a valid configuration file
    check the above values and ensure they are correct
    save config

14. Check what you saved by editing ./config
    You can skip this if you have done kernel builds
	before.

15. make dep

16. make clean

17. make bzImage

18. make modules

19. make install

21. make modules_install

21. Update /etc/lilo.conf to include the new kernel.

22. cd /etc

23. lilo

24. reboot

25. Ensure that uhci and hid are loaded by
    doing cat /proc/modules
	
	If not, load them by hand.
	
	modprobe uhci
	modprobe hid

Disclaimer

I'm not at all a kernel expert so you are pretty much on your own here. Any corrections to these instructions would be welcome. ./usr/share/doc/apcupsd/manual/config-examples.html0100644000000000000000000000564307364101706021271 0ustar rootroot Configuration Examples

Configuration Examples

A Simple Configuration

You have a Smart UPS using the cable supplied by APC. A very simple configuration file would look like the following:
## apcupsd.conf v1.1 ##
UPSCABLE smart
UPSTYPE smartups
DEVICE /dev/ttyS0
LOCKFILE /var/lock
UPSCLASS standalone
UPSMODE disable

Normally you would have many more configuration directives to completely customize your installation, but this example shows you the minimum required.

A Simple Master Configuration

You have a Smart UPS using the cable supplied by APC and you want it to act as a master for another computer, which is powered by the same UPS. A very simple configuration file would look like the following:
## apcupsd.conf v1.1 ## 
UPSCABLE smart
UPSTYPE smartups
DEVICE /dev/ttyS0
LOCKFILE /var/lock
UPSCLASS netmaster
UPSMODE net
NETTIME 10
NETPORT 6666
SLAVE slave1.mynetwork.com
SLAVE slave2.mynetwork.com

Note, the main difference from the stand alone configuration si that you have specified UPSCLASS netmaster and UPSMODE net. In addition, you have specified one or more slave machines.

A Simple Slave Configuration

You have a Smart UPS using the cable supplied by APC that is connected to the master machine configured above. This slave machine has no serial port connection to the UPS, but is powered by the same UPS as the master. A very simple configuration file would look like the following:
## apcupsd.conf v1.1 ## 
UPSCABLE ether
UPSTYPE smartups
LOCKFILE /var/lock
UPSCLASS netslave
UPSMODE net
NETPORT 6666
MASTER master.mynetwork.com

The main difference from the master configuration is that you have specified UPSCABLE ether and UPSCLASS netslave. In addition, you have specified a single controlling master.

In this configuration, the shutdown will be initiated by the master. It is also possible to specify BATTERYLEVEL, MINUTES, and TIMOUT configuration directives in the Slave machine that will cause the slave to shutdown before the master. This can often be useful if the slave is less important than the master and you wish to reduce battery power consumption so that the master can remain up longer during a power outage.

Variation on the Master/Slave Configuration

It is also possible to have a Master/Slave configuration where the Slave is powered by a different UPS (or any other power source), but is nevertheless controlled (i.e. shutdown) by the master. The setup would be identical to the Master/Slave configuration files shown above. The only difference is where the slave actually receives its power. In effect, apcupsd does not know or care where the power really comes from. ./usr/share/doc/apcupsd/manual/new_features_3_8_3.html0100644000000000000000000000643507400451645021573 0ustar rootroot New Features

New Features in Apcupsd 3.8.3

· Highlights of this release:

. The ./configure program prints a warning message if /usr/ucb is
  on your path. This for Solaris systems where the wrong shutdown
  program could be used.
. Corrected serial port lock file location on Solaris.
. Added an optional port specification to the hosts.conf file
  for configuring multimon.cgi
. Added the --disable-install-distdir configure option to allow
  clean installation of two or more apcupsds on the same system.

The software is completely developed under Linux and will compile cleanly and will work under Linux as well as many other operating systems and flavors of Linux.

What to do if you find bugs :

send an email to apcupsd-devel@apcupsd.org (Developers mailing list) or go to one of the following sites:

http://www.apcupsd.org
http://www.sibbald.com/apcupsd

Change Log

----> Release apcupsd-3.8.3 (26 Nov 2001)
      - Updated manual to include ideas/suggestions received
        from users installing 3.8.2.
      - Fixed safe.apccontrol to be a bit more system independent 
        (thanks to Steven Orr for the idea).
      - Added safe.apccontrol.in so that it is configured properly.
      - Fixed all apccontrol.sh.in so that it restart the computer if shutdown
        was cancelled. Fixed also the lock directory location in rc scripts.
      - Removed inifinite sleep from shutdown sequences.
      - Added a big warning message to the end of the ./configure
        output if /usr/ucb is on your path (for Solaris shutdown).
      - Updated Solaris configuration with specific config values.
      - Fixed reference to lock file in Solaris apcupsd.in so it is
        properly configured.
      - Removed unused variable from Solaris apcupsd.in
      - Install apcupsd.conf with 644 permissions
      - Add --disable-install-distdir ./configure option.
        This allows easier installation of slaves or
        multiple copies of apcupsd.
      - Used makedepend if not gcc (Solaris fix).
      - Set SO_REUSEADDR in slave machines.
      - Use select() to timeout master if slave does not respond.
      - Recognize APC Smart-UPS 370ci.
      - Add 940-0020C cable support (same as 20B).
      - UPSNAME now sets upsname if given. Otherwise, apcupsd
        attempts to get name from UPS, if not found, uses
        hostname, finally "default".
      - Implement CommLost NIS status.
      - Implement Shutdown NIS status.
      - Implement Slave NIS status.
      - Correct SmartTrim and SmartBoost detection code.
      - ./configure prints name of shutdown program.
      - Add port to hosts.conf.
      - Add new apccontrol arguments to script file.
      - Eliminated all N/A fields in STATUS report.
      - Always construct STATFLAG in STATUS report.
      - Added Ambient Temperature and Humidity to multimon (Carl Erhorn)
./usr/share/doc/apcupsd/manual/oldversions.html0100644000000000000000000000125407364101706020551 0ustar rootroot Invoking Apcupsd

Features in Previous Versions of Apcupsd

./usr/share/doc/apcupsd/manual/batteries.html