.TH BKPUPSD 8 "July 12, 1997" .SH NAME .B bkpupsd \- Simple UPS daemon for APC BK-Pro series .SH SYNOPSIS .B bkpupsd .I device .SH DESCRIPTION .PP The .B bkpupsd program is a Simple Uninterruptible Power Source (UPS) daemon to control APC Back-UPS Pro. series. When the power fails and goes out, the UPS daemon (upsd) shutdown the system cleanly. .PP The .I device is a serial port name connected to UPS. e.g. .I /dev/cuaa0 or .I /dev/cuaa1, as a fully qualified device node under /dev. If Omitted, the .I device is assumed to be .I /dev/cuaa1 by default. .PP The .B bkpupsd is designed to control UPS in .BR dumb mode. Current specifications are follows: .TP 8 .B UPS When the power goes out, the UPS switches power source to battery and signals the power went out by raising the serial port control line .BR RNG . If battery power is also exhausted or failed, the UPS signals the battery low by lowering .BR CTS . When .BR DTR is high and .BR RNG goes high, the UPS induce itself to shutdown 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 automatically.) .TP 8 .B bkpupsd The upsd monitors the serial port, keeps .BR DTR raised and .BR RTS lowered. When the upsd sees the .BR RNG goes high, runs the .I bkpups.failed (powerfail warning shell-script) and reports powerfailure to .BR syslog . If the powerfailure continued for 5 minutes, the upsd runs the .I bkpups.shudown (shutdown shell-script) , reports to .BR syslog and makes the UPS to sleep by raising .BR RTS . The power recovered within 5 minutes, the upsd runs the .I 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 .I bkpups.battlow (emergency shutdown shell-script) immediately, reports to .BR syslog and makes the UPS to sleep. .SH FILES .PD 0 .TP 8 .B /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) .TP .B /usr/local/libexec/bkpupsd/bkpups.shutdown Shutdown Shell-script: A shell-script to shutdown the system cleanly. .TP .B /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. .TP .B /usr/local/libexec/bkpupsd/bkpups.battlow Emergency shutdown Shell-script: A shell-script to excute emergency halt for battery power failing. .PD .SH EXAMPLES .TP .B /usr/local/sbin/bkpupsd The UPS is connected to the serial port2 (COM2:) and default value .I /dev/cuaa1 is used. .TP .B /usr/local/sbin/bkpupsd /dev/cuaa0 The UPS port is specified to be the serial port1 (COM1:) .I /dev/cuaa0 using command line argument. .PD .SH 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. .SH SEE ALSO .BR upsd (8) .LP .SH 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. .SH AUTHOR Yoshifumi Watanabe .SH HISTORY The bkpupsd appeared after FreeBSD 2.2.1R. .LP