BKPUPSD(8)BKPUPSD(8)NAMEbkpupsd - Simple UPS daemon for APC BK-Pro series
SYNOPSISbkpupsd device
DESCRIPTION
The bkpupsd program is a Simple Uninterruptible Power Source (UPS) dae‐
mon to control APC Back-UPS Pro. series. When the power fails and goes
out, the UPS daemon (upsd) shutdown the system cleanly.
The device is a serial port name connected to UPS. e.g. /dev/cuaa0 or
/dev/cuaa1, as a fully qualified device node under /dev. If Omitted,
the device is assumed to be /dev/cuaa1 by default.
The bkpupsd is designed to control UPS in dumb mode. Current specifica‐
tions are follows:
UPS When the power goes out, the UPS switches power source to bat‐
tery and signals the power went out by raising the serial port
control line RNG. If battery power is also exhausted or
failed, the UPS signals the battery low by lowering CTS. When
DTR is high and RNG goes high, the UPS induce itself to shut‐
down mode. In the shutdown mode the UPS stops supplying power
to save the battery from overload and waits the recovery of the
power. (After the power returns, the system will restart auto‐
matically.)
bkpupsd The upsd monitors the serial port, keeps DTR raised and RTS
lowered. When the upsd sees the RNG goes high, runs the
bkpups.failed (powerfail warning shell-script) and reports pow‐
erfailure to syslog. If the powerfailure continued for 5 min‐
utes, the upsd runs the bkpups.shudown (shutdown shell-script)
, reports to syslog and makes the UPS to sleep by raising RTS.
The power recovered within 5 minutes, the upsd runs the
bkpups.restored (shell-script for power recovery) and continues
to monitor the serial port for another powerfilure. In case the
batter low is observed, the upsd runs the bkpups.battlow (emer‐
gency shutdown shell-script) immediately, reports to syslog and
makes the UPS to sleep.
FILES
/usr/local/libexec/bkpupsd/bkpups.failed
Powerfailure warning Shell-script: A shell-script to inform
users the power goes out and the system will be down soon.
(Warning only)
/usr/local/libexec/bkpupsd/bkpups.shutdown
Shutdown Shell-script: A shell-script to shutdown the system
cleanly.
/usr/local/libexec/bkpupsd/bkpups.restored
Power recovery Shell-script: A shell-script to inform users the
power has been restored and system shutdown was canceled.
/usr/local/libexec/bkpupsd/bkpups.battlow
Emergency shutdown Shell-script: A shell-script to excute emer‐
gency halt for battery power failing.
EXAMPLES
/usr/local/sbin/bkpupsd
The UPS is connected to the serial port2 (COM2:) and default
value /dev/cuaa1 is used.
/usr/local/sbin/bkpupsd /dev/cuaa0
The UPS port is specified to be the serial port1 (COM1:)
/dev/cuaa0 using command line argument.
NOTES
The interface cable must be compatible with manufacturer's interface
kits. The shell-scripts can be modified ajusting your system. The
recommanded file permissions for these scripts are "chmod root.wheel
700"(because anyone who can run these scripts also get the privilage of
shutdonw the system). bkpupsd requires to be run in root privilage to
execute the shell-scripts. The bkpupsd will be replaced with FreeBSD
standard Alexis Yushin's upsd which is under development.
SEE ALSOupsd(8)BUGS
If the power recover after the shutdown script run, the system shutdown
will not be canceled, auto-restart may not performed and the system may
be halted until restart is invoked using reset switch.
AUTHOR
Yoshifumi Watanabe <mwatts@edu1.tokyo-med.ac.jp>
HISTORY
The bkpupsd appeared after FreeBSD 2.2.1R.
July 12, 1997 BKPUPSD(8)