[Nut-upsdev] Joining forces with the Network UPS Tools
Arjen de Korte
nut+devel at de-korte.org
Mon Oct 6 17:05:55 UTC 2008
Citeren Arnaud Quette <aquette.dev at gmail.com>:
>> Never mind, I already figured out a usage. If one of the machines connected
>> to an outlet gets stuck and you want to cycle the power on that outlet
>> (probably the main reason to use RPC's in the first place) you want to bring
>> down the other systems on that outlet down cleanly. Shutting down the whole
>> UPS/RPC system is currently the only option and this could be made more fine
>> grained.
> that's 1 of the 2 main use cases here.
> the other being that upsmon could monitor
> outlet.X.autoswitch.charge.low (where X is the outlet on which we
> subscribed the slave) against battery.charge to launch the shutdown
> without the need of upssched.
I'm afraid that's something that is not very practical to use. :-)
We would need to know in advance then how much time is remaining
before the UPS reaches the 'autoswitch' level. Any mistakes here, and
you risk that the UPS will switch off the power before the client has
finished shutting down. As far as I'm concerned, the only use for
'outlet.X.autoswitch.charge.low' is for loads that don't suffer from a
sudden power loss. I don't think many systems running 'upsmon' fall
into that category.
Regarding the use of multiple outlet systems, this could be solved in
a driver independent way by creating a 'repeater' driver. That driver
would connect to an existing driver socket and provide additional
'pseudo' UPS'es with an additional command set that tells which
parameters to override from the master UPS:
[master-ups]
driver = usbhid-ups
port = auto
[slave-1]
driver = repeater
port = master-ups
desc = "Outlet 1"
battery.charge.low = 30
[...]
[slave-2]
driver = repeater
port = master-ups
desc = "Outlet 2"
battery.charge.low = 50
[...]
You get the idea. The repeater would just listen to the master and
adjust the 'ups.status' and 'battery.charge.low' (in this example)
accordingly.
The advantage here is that we don't need any changes to the existing
server or clients. It also doesn't need any changes to existing
drivers, since they already support multiple connections on their
driver socket.
Best regards, Arjen
--
Please keep list traffic on the list
More information about the Nut-upsdev
mailing list