mgeupsd -- monitor a state of MGE Pulsar UPS connected to RS-232 port.
/sbin/mgeupsd [options] serial-device
mgeupsd is a daemon process that sits in the background and check state
of the UPS every 10 (by default) seconds. As soon as mgeupsd senses
that the power is failing it notifies init(8) and init will execute the
powerwait and powerfail entries. If mgeupsd senses that
the power has been restored, it notifies init again and init will
execute the powerokwait entries. If mgeupsd senses that the UPS
batteries has less than 20% of its energy it notifies init again and
init will execute the powerfailnow entries.
- -pwroff
- turn ups off.
- -q
- same as -pwroff.
- -l
- use syslog for reporting. off by default, but very useful option.
- -i N
- set UPS checking interval to N seconds. Default 10
- -li N
- 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
- -s on|off
- turn power saving mode on or off (see UPS manual for more information
about power saving mode)
- -p on|off
- turn total discharge protection on or off (see UPS manual for more
information about total discharge protection)
- -t trace_file
- 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.
- serial-device
- Some serial port that is connected to your MGE Pulsar device.
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:
- -pwrfile filename
- Change power status filename from default (/etc/powerstatus) to something
else.
- -process pid
- Change pid of process to send SIGPWR from default (1 - init) to pid.
mgeupsd check is this process running.
- -run /path/cmd
- 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.
- -swpwr W,B
- Switch (turn off/on) power. Argument W set the time in minutes to
wait before turning power back to on. Argument B 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.
Just because UPS communicate with macine through RS-232 interface mgeupsd
report to syslog if communication with UPS lost. Mgeupsd will notify
you about this fact every minute. When it sees that the connection has been
restored it will say so.
Well, when you found bug in this program send me E-mail about this.
shutdown(8), init(8), inittab(5).
Stanislav Voronyi, stas@esc.kharkov.com