[Nut-upsuser] two MGE Ellipse 1500 ups via usb
thomas.gutzler at gmail.com
Tue Nov 17 04:18:11 UTC 2009
Arjen de Korte wrote:
> Citeren Thomas Gutzler <thomas.gutzler at gmail.com>:
>> On a slightly related note.
>> Is it possible to configure two different SHUTDOWNCMDs for two different
> Could you explain why you think you need this? The SHUTDOWNCMD is used
> to bring down the host 'upsmon' is running on. It makes no sense to make
> this different depening on which UPS is critical. The host should either
> be shutdown or not (depending on whether or not the total powervalue
> available is enough).
> I have the feeling that you're trying to abuse this command to do
> something that really should be done through 'upssched' instead. Please
> explain in detail what you are trying to do.
You're right. I had a closer look at upssched and I'm using it now to
catch some of the notify events.
My setup is this: I have 6 computers on 2 UPSs (3 each). Boths UPSs have
equal power ratings but the load on the slave is less. They are both
connected to and monitored by the same computer (I call it monitor); one
UPS is configured as master (the one with the monitor on it) and the
other is configured as slave. The computers connected to slave should
shut down first because they're nfs mounting from one of the computers
on the master UPS.
Assuming that the master runs out of battery first, my understanding is
that I could catch the master's LOWBATT notice and use it to shut down
the computers on the slave (via ssh <host> poweroff) and then catch the
master's FSD to shut down the computers on the master excluding the
monitor because that one is brought down last (to runlevel 0) by upsmon
executing SHUTDOWNCMD. Is there a smarter way doing it - perhaps setting
To make sure both UPSs shut down, I write a shutdown script for runlevel
0 which checks for the existence of POWERDOWNFLAG, runs upsdrvctl
shutdown for all UPSs and possibly a shutdown -P now. Fortunately,
ubuntu comes with such a script (K50nut) but it has to be executed with
the parameter 'poweroff', not 'stop'. So, am I supposed to write a
shutdown script /etc/rc0.d/K99upspoweroff that calls '/etc/rc0.d/K50nut
What's left but not necessary is to make sure that 'Interval to wait
after shutdown with delay command (seconds)' on my master UPS is long
enough for the monitor to power off properly after being halted.
I'm assuming that 'Interval to wait before (re)starting the load
(seconds)' means 'Interval to wait before (re)starting the load once
main power is back (seconds)'?
Maybe I'm thinking the wrong way, please correct me if I'm wrong or if
I'm supposed to do things differently.
More information about the Nut-upsuser