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
This final step is important if you want to ensure that your system
will automatically reboot when the power comes back on. The actual
code used on the Red Hat version is:
# See if this is a powerfail situation. # ***apcupsd***
if [ -f /etc/apcupsd/powerfail ]; then # ***apcupsd***
echo # ***apcupsd***
echo "APCUPSD will now power off the UPS" # ***apcupsd***
echo # ***apcupsd***
/etc/apcupsd/apccontrol killpower # ***apcupsd***
echo # ***apcupsd***
echo "Please ensure that the UPS has powered off before rebooting" # ***apcupsd***
echo "Otherwise, the UPS may cut the power during the reboot!!!" # ***apcupsd***
echo # ***apcupsd***
fi # ***apcupsd***
The above code must be inserted as late as possible in the halt script. On
many systems, such as Red Hat, all the disk drives were unmounted, then
remounted read-only, thus permitting access to the /etc files and the apcupsd
executable. If your system does not explicitly remount the disks, you must
remount them in read-only mode in the code that you add. Examples of code
fragments that do this can be found in the distributions/suse subdirectory
of the source.
If you are not able to insert the above code in your halt script because there
is no halt script, or because your halt script calls the init program as some
Unix systems do, you can either just forget about powering off the UPS,
which means that your machine will not automatically reboot after a power
failure, or there is yet another alternative, though not at all as satisfying as
inserting code in the halt script.
Only if you cannot insert the appropriate code in the halt script, when
you start apcupsd, normally from the /etc/rc.d/init.d/apcupsd script, use
the --kill-on-powerfail option. This will cause apcupsd to program the
UPS to shutoff the power just before it (apcupsd) does the system shutdown.
Please note that this is not the most ideal solution. Read on to understand
why.
A very important consideration is that you must set the EEPROM in your
UPS so that it waits a sufficient time for the system to halt before it shuts
off the UPS power. The current value as well as the permitted values for
your UPS can be determined by executing:
apcaccess eeprom
183










