.\" Original by rac@sherpa.UUCP (Roger Cornelius) .\" Modified for Sun with syslog, built-in script, .\" ron@18james.com, 8 Mar 1992 .\" .TH PF 8 .SH NAME pf \- monitor UPS system for power failure .SH SYNOPSIS .B pf [-d device] [-i ignoretime] [-s script] .SH DESCRIPTION .PP \fBpf\fR runs in the background and monitors the UPS system for a signal that power has failed. It should normally be launched from one of the system startup scripts in \fI/etc/rc\fR, but may be run from the command line. .IP "\fB-d\fR \fIdevice\fR" \fIdevice\fR specifies the serial port for UPS signals. \fIdevice\fR must be a modem-control device. For Sunos, put \fIoff remote\fP in the \fBstatus\fP column of \fI/etc/ttytab\fP for the serial port connected to the UPS. For Solaris, run \fIpmadm -r -p zsmon -s tty[a|b]\fP. The default device is \fI/dev/ttyb\fR. .IP "\fB-i\fR \fIignoretime\fR" \fIignoretime\fR specifies the amount of time, in seconds, to wait before rechecking the UPS after first determining a power failure. \fIignoretime\fR should be a portion of the total estimated battery reserve time for the UPS. You should also take into account the time needed by \fBshutdown\fR to actually bring the system down. .IP "\fB-s\fR \fIscript\fR" The default shutdown command for Sunos is \fI/etc/shutdown now "Power Failure"\fR. For Solaris the default command is \fI/usr/sbin/shutdown -i5 -y "Power Failure"\fP. There is a compilation option to use the \fIsys-suspend\fP command in Solaris on architectures (sparc4m, sparc4u) which support suspend/resume. .SH NOTES \fBpf\fR was written for the American Power Conversions model 600LS UPS, but should work for any UPS which signals power failure by asserting the Carrier Detect (CD) signal. .PP You must be root to execute \fBpf\fR. .SH "SEE ALSO" .IR shutdown (1M) .IR sys-suspend (1M) .SH DIAGNOSTICS If during power failure, \fBpf\fR is unable to exec the shutdown, (either the default command or a script specified with -s), it attempts to write an appropriate error message to the system logger. .SH AUTHOR An early version was written by Roger Cornelius . This version, by Ronald Florence , is heavily modified to use syslog and incorporate the shutdown script. Some additional modifications are attributed in the source code.