.TH MGEUPSD 8 "Dec 23, 1998" "" "Linux System Administrator's Manual" .SH NAME mgeupsd -- monitor a state of MGE Pulsar UPS connected to RS-232 port. .SH SYNOPSIS .B /sbin/mgeupsd .RB "[options] serial-device " .SH DESCRIPTION .B mgeupsd is a daemon process that sits in the background and check state of the UPS every 10 (by default) seconds. As soon as \fBmgeupsd\fP senses that the power is failing it notifies \fBinit\fP(8) and init will execute the \fBpowerwait\fP and \fBpowerfail\fP entries. If \fBmgeupsd\fP senses that the power has been restored, it notifies \fBinit\fP again and init will execute the \fBpowerokwait\fP entries. If \fBmgeupsd\fP senses that the UPS batteries has less than 20% of its energy it notifies \fBinit\fP again and init will execute the \fBpowerfailnow\fP entries. .SH OPTIONS .IP \fB-pwroff\fP turn ups off. .IP \fB-q\fP same as -pwroff. .IP \fB-l\fP use syslog for reporting. off by default, but very useful option. .TP .B -i \fIN\fP set UPS checking interval to N seconds. Default 10 .TP .B -li \fIN\fP set to N interval for reporting battery low status. Usually if battery low status reported init must start immediate shutdown. When shutdown started it must kill mgeupsd. If mgeupsd not killed during N seconds the low battery status will be reported again. Default 30 .TP .B -s \fIon|off\fP turn power saving mode on or off (see UPS manual for more information about power saving mode) .TP .B -p \fIon|off\fP turn total discharge protection on or off (see UPS manual for more information about total discharge protection) .TP .B -t \fItrace_file\fP turn on trace of UPS<->computer communication protocol. Use only for debugging - this produce a huge output. Since trace_file stay opened all time to its remove you must kill mgeupsd before. .IP \fBserial-device\fP Some serial port that is connected to your MGE Pulsar device. .PP Since version 0.3 you may use your UPS not only for protecting the computer, powered from UPS. You may connect to computer UPS which protect any other equipment (f.e. rack-mount modems). For this case there are some additional options: .TP .B -pwrfile \fIfilename\fP Change power status filename from default (/etc/powerstatus) to something else. .TP .B -process \fIpid\fP Change pid of process to send SIGPWR from default (1 - init) to pid. .B mgeupsd check is this process running. .TP .B -run \fI/path/cmd\fP Don't send SIGPWR at all, but run specified program & give power status file as a first argument. Note that program must be specified with full path. .TP .B -swpwr \fIW,B\fP Switch (turn off/on) power. Argument \fIW\fP set the time in minutes to wait before turning power back to on. Argument \fIB\fP set the time in seconds to wait before turning power off. You may set only one time (f.e. -swpwr W or -swpwr ,B or even -swpwr ,) - in this case unspecified time will be set to 0. Note that the time before power off must be in seconds, but the time before power on - in minutes. If waiting time for turn UPS back to on set to 0, power will be turned off just about 5 seconds. .SH DIAGNOSTICS Just because UPS communicate with macine through RS-232 interface \fBmgeupsd\fP report to syslog if communication with UPS lost. \fBMgeupsd\fP will notify you about this fact every minute. When it sees that the connection has been restored it will say so. .SH BUGS Well, when you found bug in this program send me E-mail about this. .SH SEE ALSO shutdown(8), init(8), inittab(5). .SH AUTHOR Stanislav Voronyi, stas@esc.kharkov.com