User's Manual UPS control system
Table Of Contents
- Apcupsd User's Manual
- Release Notes
- How To Use This Manual
- Basic User's Guide
- Planning Your Installation
- Building and Installing apcupsd
- After Installation
- Configuration Examples
- Testing Apcupsd
- Troubleshooting Your Installation
- Monitoring and Tuning your UPS
- Maintaining Your UPS
- Frequently-Asked Questions
- Apcupsd Bugs
- Advanced topics
- Customizing Event Handling
- Master/Slave Configurations
- Controlling Multiple UPSes on one Machine
- Support for SNMP UPSes
- Alternate Ways To Run The Network Information Server
- apcupsd System Logging
- Installation: Windows
- Windows Version of apcupsd
- Installation: Serial-Line UPSes
- Overview of Serial-Interface UPSes
- Connecting a Serial-Line UPS to a USB Port
- Connecting a APC USB UPS to either a PC USB or Serial Port
- Cables
- Smart-Custom Cable for SmartUPSes
- Smart Signalling Cable for BackUPS CS Models
- Voltage-Signalling Cable for "dumb" UPSes
- Other APC Cables that apcupsd Supports
- Voltage Signalling Features Supported by Apcupsd for Various Cables
- Voltage Signalling
- Back-UPS Office 500 signals
- Analyses of APC Cables
- Win32 Implementation Restrictions for Simple UPSes
- Internal Apcupsd Actions for Simple Cables
- RS232 Wiring and Signal Conventions
- Pin Assignment for the Serial Port (RS-232C), 25-pin and 9-pin, Female End
- Ioctl to RS232 Correspondence
- Testing Serial-Line UPSes
- Troubleshooting Serial Line communications
- Recalibrating the UPS Runtime
- DATA Logging
- Technical Reference
- Configuration Directive Reference
- apcupsd Status Logging
- Shutown Sequence and its Discontents
- APC smart protocol
- Apcupsd --- RPM Packaging FAQ
- Credits
- Kernel Config
shutdown(8) command. You can modify the behavior by editing the
/etc/apcupsd/apccontrol script, but doing so will make it more com-
plicated to upgrade to the next apcupsd version.
The conditions that trigger the shutdown can be: running time on
batteries have expired (TIMEOUT), the battery runtime remaining
is below the configured value (BATTERYLEVEL), the estimated re-
maining runtime is below the configured value (MINUTES), or the
UPS signals that the batteries are exhausted.
A shutdown could also be initiated if apcupsd detects that the batteries
are no longer functioning correctly. This case, though very unusual,
can happen at any time even if there is proper mains voltage, and
/etc/apcupsd/apccontrol emergency is called.
Just before initiating any shutdown through the apccontrol script,
apcupsd will create the file /etc/apcupsd/powerfail. This file will be
used later in the shutdown sequence to recall apcupsd after syncing of
the disks to initiate a power off of the UPS.
If the /etc/nologin file has not already been created, it will normally
be created during the shutdown sequence to prevent additional users
from logging in (see the NOLOGIN configuration directive).
Even though apcupsd has requested the system to perform a shutdown,
it continues running. If it is a master with slaves, it will inform the
slaves to do a shutdown. They perform their shutdown by calling
/etc/apcupsd/apccontrol remotedown.
• When the system signals apcupsd to do exit, it does so. This is part of
the normal system shutdown (at least on Unix and Linux systems) and
the exact time that apcupsd receives the termination signal depends
on how the shutdown links (usually in /etc/rc.d) are set.
Note that on Windows NT systems, apcupsd apparently continues to
run as a Service even though the machine is “shutdown”.
• During the shutdown of the system after apcupsd has been forced to
exit, one of the last things done by the system shutdown is to call the
halt script, which is usually in /etc/rc.d/halt or /etc/rc.d/init.d/halt,
or possibly in /sbin/init.d/rc.0 depending on your system. If apcupsd
was properly installed, this standard halt script was modified to in-
clude a bit of new logic just before the final halt of the system. It first
tests if the file /etc/apcupsd/powerfail exists, and if it does, it exe-
cutes /etc/apcupsd/apccontrol killpower. It is this last step that
will cause apcupsd to be re-executed with the --killpower option on
the command line. This option tells apcupsd to inform the UPS to
kill the power.
182










