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

Marco Chiappero marco at absence.it
Tue Nov 3 09:59:05 UTC 2009


Arjen de Korte ha scritto:
> Citeren Marco Chiappero <marco at absence.it>:
> This is what I expected too, but from what I have observed when trying 
> this out, this doesn't seem to be the case. If we poll for the XML 
> summary pages after receiving an alarm, the discussion is moot anyway, 
> since so far I have not seen any alarms that are not also available 
> through polling the NMC.

Ah ok.. sure, you are right, a client can get exactly the same 
information (but the BelowRemainingCapacityLimit) from the get_object 
and summary page. The whole key is in knowing when to shutdown (and 
maybe read some other objects for shutdown testing purpose), if we just 
look at the web pages and take the shutdown decision by ourselves we no 
longer need a NSM client.

>> Well, alarm messages are host specific. That said, I can't understand 
>> why we should need to read messages for outlets we are not even 
>> using... Is there a reason for connecting a single host to many 
>> outlets of a single ups?
> 
> Yes. This is how NUT is supposed to work.

Ok, you are right, I know this but I started from the assumption that 
this is not the case for a NSM, where the real server is the NMC. For 
this reason, I thought to expose a simple UPS without programmable 
outlets and just the minimum informations needed.

> Using a networked UPS would indeed allow each host to talk to the UPS 
> (NMC in this particular case). However, in that case the layered 
> structure we use is overly complex.

Well, certainly a bit, however NUT can deal with different UPSes, 
multiple UPSes/PSU and so on... but I do understand you reasons.

> If you don't want the centralized 
> upsd server, it would be much easier to just write an NSM client from 
> scratch. This would remove quite a bit of overhead and people would only 
> have to setup a single NSM client, instead of having to configure a 
> driver, a server and a client.

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.
I'm not going to write a new open source client, the code for a NUT 
driver it's almost already there and it requires really a couple of 
minutes, once in a year, to create my own NUT packages. And I'm afraid 
you have better things to do too, than writing a new client.
If you prefer we can abandon this idea, no problem :)

>> We still need a small polling interval if we want to keep things easy 
>> and use a non blocking read from the socket. However this implies more 
>> "work" on the client side only.
> 
> Not at all. Search the developer documentation for the 'extrafd'
> [...]

I had a look to many doc files but I didn't know about it, sorry. I'll do.

> 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.


Best regards,
Marco



More information about the Nut-upsdev mailing list