[APCUPSD DOCUMENTATION]

Apcupsd Linux UPS daemon version 3.8.1

apcupsd a Linux daemon for controlling APC UPSes

SYNOPSIS

/sbin/apcupsd
/etc/apcupsd/apccontrol
/etc/apcupsd/apcupsd.conf
/sbin/apcaccess
/sbin/apcnetd

DESCRIPTION

Apcupsd can be used for controlling the APC SmartUPS. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exhausted, a timeout (seconds) expires, or runtime expires based on internal APC calculations determined by power consumption rates. If the power is restored before one of the above shutdown conditions is met, apcupsd will inform users about this fact.

Apcupsd performs the shutdown by calling /etc/apcupsd/apccontrol, which is a shell script. Consequently, no changes to /etc/inittab are necessary. There is no communication between apcupsd and init(1) process. During installation, the system halt script was modified so that at the end of the shutdown process during a power failure, apcupsd will be re-executed in order to power off the UPS. This step is not mandatory, but is good practice as it avoids the possibility of your system being prematurely restarted if the power returns for a short period.

The apcupsd daemon now supports two networking modes that function independently, but if desired at the same time.

Most users will probably enable the first network mode, which permits apcupsd to serve STATUS and EVENTS information to clients over the network.

The second networking mode is for multiple networked machines that are powered by the same UPS. In this mode, one machine is configured as a master with the UPS attached to the serial port. The other machines (maximum 20) powered by the same UPS are configured as slaves. The master has a network connection with the slaves and sends them information about the UPS status. Please see the UPS Sharing section of this document for more details.

RedHat and S.u.S.E. versions of Linux have direct install support. All other flavors of Linux may need some fussing with to get the install correct.

SUPPORTED MODELS

Please see the Configuration section of this document for more details.

OPTIONS

-c --configure
Attempts to configure the UPS EPROM to the values specified in the configuration file /etc/apcupsd/apcupsd.conf.
-d --debug <level>
Turns on debugging output for a NETSLAVE or a NETMASTER.
f --config-file <file>
Specifies the location of the configuration file. The default is: /etc/apcupsd/apcupsd.conf
-k --killpower
Attempt to turn the UPS off. This option is normally only used by the daemon itself to shut the UPS off after a system shutdown has completed. Note, if the killpower is done by a netmaster, it will sleep for 30 seconds before issuing the power kill request to the UPS to allow the slaves to properly shutdown.
-n --rename-ups
Attempts to change the UPS name stored in the UPS EPROM to that specified in your /etc/apcupsd/apcupsd.conf file.
-t, --term-on-powerfail
This option tells apcupsd to exit immediately when it issues the system shutdown command (i.e. calls apccontrol). This behavior can be useful for those systems where it is not possible to insert apcupsd commands in the termination script in order to do the killpower. Without this option, apcupsd will wait for the SIGTERM signal from the system shutdown before exiting.
-u --update-battery-date
Attempts to update the battery date stored in the UPS EPROM. Normally done after a battery replacement.
-V --version
Prints the apcupsd version number and the usage.
-? --help
Prints a brief apcupsd help screen.

FILES

/etc/apcupsd/apcupsd.conf - configuration file.
/etc/apcupsd/apcupsd.status - STATUS file
/etc/apcupsd/apcupsd.events
where up to the last 50 events are stored for the network information server.

SEE ALSO

apcnetd(8)

AUTHOR

André M. Hedrick

Retired Co-Author

Christopher J. Reimer

Contributors and Testers for Version 3.7.0

André M. Hedrick <andre@suse.com>
Brian Schau <Brian.Schau@Digital.com>
Riccardo Facchetti <riccardo@master.oasi.gpa.it>
Carl Erhorn <Carl_Erhorn@hyperion.com> (Solaris Port)
Petr Soucek <petr@ryston.cz>
Jonathan H N Chin <jc254@newton.cam.ac.uk>
Neil Darlow <neil@darlow.co.uk>
Michael Perscheid <michael@perscheid.de>
Kaspar Klingholz <kp@balu.klingholz.de>
Chris Adams <cmadams@hiwaay.net>
Vladimir Ivaschenko <hazard.bsn@hazard.maks.net>
Thorsten Ziegler <ziegler@schlund.de>
Matt Mozur <matt.mozur@flashcom.net>
Thomas Porter <txporter@mindspring.com>
David W. Wormuth <dwormuth@post.harvard.edu>
Robert K. Nelson <rnelson@airflowsciences.com>
Tom Schroll <storm@liststorm.com>
John McSwain <jmcswain@InfoAve.Net>
Brian Daniels <briandaniels@mindspring.com>
Marcus Redivo <mredivo@binarytool.com>
Al Tuttle (Binkster) <altuttle@home.com>
Christian Moeller <moeller@curbysoft.dk>
Kern Sibbald <kern@sibbald.com>

The Brave Unnamed PATCH-WORKS and TESTERS on Previous versions

Daniel Quinlan
Tom Kunicki
Karsten Wiborg <4wiborg@informatik.uni-hamburg.de>
Jean-Michel Rouet
Chris Adams
Jason Orendorf
Neil McAllister
Werner Panocha
Lee Maisel
Riccardo Facchetti
Brian Schau

The Information HELPERS and TESTERS.

Eric S. Raymond
Chris Hanson
Pavel Alex
Theo Van Dinter
Thomas Porte
Alan Davis
Oliver Hvrmann
Scott Horton
Matt Hyne
Chen Shiyuan

Other Credits

Miquel van Smoorenburg
The Doctor What
Pavel Korensky
Russell Kroll <rkroll@exploits.org> for the CGI programs
Jonathan Benson <jbenson@technologist.com> for adapting the upsstatus.cgi program to work with apcupsd

gd 1.2 Image Library used in our CGI programs

gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. Permission granted to copy and distribute this work provided that this notice remains intact. Credit for the library must be given to the Quest Protein Database Center, Cold Spring Harbor Labs, in all derived works. This does not affect your ownership of the derived work itself, and the intent is to assure proper credit for Quest, not to interfere with your use of gd.

gd 1.2 was written by Thomas Boutell and is currently distributed by boutell.com, Inc.

Parts of the VNC project by ATT (cool code) were used as templates for our Win32 code, see: http://www.uk.research.att.com/vnc

Bugs and Limitations

All the network modes are not supported yet. There are possible bugs in all ShareUPS mode types. If anyone has had success at all with any ShareUPS models, please report it.

apcupsd will interpret an automatic self test as a power failure because there was a transfer to batteries. This normally occurs at most once a week or once every two weeks, and the supposed power failure lasts a matter of seconds. This will be corrected in a future version to report that a self test was done.

EtherUPS/NetUPS

This is fully functional as of version 3.4.0.