[Nut-upsdev] MGE NMC and NutShutdownModule (and other stuff)

Arjen de Korte nut+devel at de-korte.org
Tue Nov 3 10:32:21 UTC 2009

Citeren Marco Chiappero <marco op absence.it>:

> Understood...  you are indeed right and I'm a bit doubtful...  
> However adding this in NUT requires a low amount of code, NUT is  
> using almost no CPU at all and the configuration can be still simple  
> enough (for example: MODE=standalone, LISTEN = name.domain.tld,  
> basic upsmon config. An extended documentation can help a lot).  
> Well, I don't know what to do, it's a your decision to have a NSM  
> client in NUT.

We will have an NSM client in NUT, if not only to limit the polling  
rate (which has bothered me for quite a while). Currently, at a mere 5  
second polling rate, the CPU load for the netxml-ups driver is almost  
an order of magnitude that of the usbhid-ups driver (monitoring the  
same UPS). The alarms really help us to determine when to poll the  
driver, so even if we wouldn't parse the alarm messages (I don't think  
that would make sense though), it would already be meaningful.


>> This is what happens if you trigger a shutdown test. But if you  
>> switch off an outlet through the UPS Controls page, it will never  
>> reach that.
> Right, I knew about it and I'm afraid there's no solution. But  
> shouldn't be a huge limitation.

If we add an NSM client mode (and we will have one in the near  
future), people will expect it to behave in a similar way as the NSM  
clients they have been using so far. So this is a must-do for the  
driver, not something optional.

But I don't think this is too hard to implement. We know when the  
timers are running (through the alarms) and we also know the shutdown  
duration requested on the outputs, so it shouldn't be too problematic  
to insert a FSD flag. I just wish the NMC would have used the  
ShutdownImminent flag that is supposed to tell this, but for some  
mysterious reason it doesn't seem to be used by the NMC.

Even when using the current netxml-ups you will be in for a surprise  
if you trigger a delayed shutdown with reboot. This will kill the  
power after a delay, but there will be no advance warning. As far as I  
can see now, the only thing we can do about that is setting the FSD  
flag if the shutdown timer is running and the value is lower than the  
shutdown duration for that output.

Best regards, Arjen
Please keep list traffic on the list

More information about the Nut-upsdev mailing list