[Nut-upsuser] Shutdown when both (all) UPS on battery / low battery

Rafal Oleszek r.oleszek at wasko.pl
Thu Jan 23 07:33:07 UTC 2014


> On Jan 21, 2014, at 9:24 AM, Rafal Oleszek wrote:
>
>> I tried all options:
>> 1,2
>> and in MINSUPPLIES: 1,2,3,4
>> still didn't work.
>
> My mistake - I gave you the wrong advice before. For MINSUPPLIES, I'm used
> to either a 1:1 UPS-to-server ratio, or 2:1 where the server can run with
> either power supply unpowered.
>
> I just tried this in upsmon.conf:
>
> MONITOR dummy1 1 monuser password slave
> MONITOR dummy2 1 monuser password slave
> MINSUPPLIES 1
>
> With only one dummy-ups set to "OB LB", upsmon kept polling. When both
> were set to "OB LB", it tried to shut down the system.
>
> That was with NUT 2.7.1 - I don't remember any bugs in this area, but it
> would be in the changelog.
>
>> UPS_251 and UPS_252 feeds all environment and it's not feed directly one
>> server, but many of them.
>
> Right, and only the master is responsible for shutting down the UPS
> itself. Or do you mean that not all of the servers are connected to both
> UPSes?
>
> --
> Charles Lepple
> clepple at gmail
>

UPS_251 and UPS_252 feeds all servers (about 40).


>On Jan 21, 2014, at 9:27 AM, Rafal Oleszek wrote:
>
>> So it's impossible to configure upssched to start timer only if all ups
>> are in status: OB or LB ?
>
> Not impossible, just not possible inside a single configuration file.
You > can always
> put that logic into an external script called by upssched.

NUT is installed only on one server and scripts (to order shutdown
environment) are called by upssched when UPS_251 and UPS_252 change state
into OB (first script) and LB (second script). But NUT isn't waiting for
both UPS. Just start timer when only one goes on OB. Maybe it is working
only for SHUTDOWNCMD?
In manual there is a section about timers: * mean that if ANY of ups goes
OB it start proceed. Maybe that why it's not waiting for both UPS?





More information about the Nut-upsuser mailing list