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

Arjen de Korte nut+devel at de-korte.org
Tue Oct 27 22:21:10 UTC 2009


Citeren Marco Chiappero <marco op absence.it>:

>> 1) Both netxml-ups drivers can't connect at the same time via NSM  
>> to their respective NMC's. We must have two instances of the  
>> netxml-ups driver running (to provide access to all variables in  
>> the UPS) and as far as I can see we can only accommodate one NSM  
>> client (due to the listening socket that is needed for the callback  
>> from the NMC's) per host.
> No. This would be a problem when using the UDP protocol, that I  
> didn't implemented, where there is a single socket reading broadcast  
> messages sent by the UPSes. In such case we would need the driver  
> approach (but that breaks the single_UPS--single_driver_instance  
> design [1]) or the new deamon approach (that shall take care about  
> talking to the NMC directly). Otherwise this is false and you can  
> run every netxml-ups instances you want (or run UDP in a single UPS  
> scenario only).

This is what I misunderstood. I though the driver would have to open a  
socket for listening and wait for a connection *from* the NMC (like  
the NSM client that is provided by Eaton), but apparently this  
mechanism isn't used and instead it opens a connection *to* the NMC.  
In that case, you would indeed be able to run multiple NSM enabled  
drivers in parallel. The only objection that remains then is that  
putting this in the netxml-ups driver is probably not a good idea. It  
would be quite a burden on the little micro controller in the NMC  
66102, since it would also require parsing the full XML data for each  
instance. If you'd make this NSM driver a separate one however, I'd be  
all for it.

A separate (new) driver would also deal with the case where you'd  
define a meta UPS (like the globalups example you wrote about earlier)  
where neither of two (or more) individual UPS devices that would be  
part of this meta UPS could be the sole source of information like  
voltages, currents and battery charge. In such case, you'd only be  
able to tell whether the clients that connect to that meta UPS would  
need to shutdown or not. All remaining info (for logging purposes)  
would need to come from drivers that connect to a single UPS device  
(however, that probably wouldn't be relevant to the clients that  
connect to the meta UPS anyway).

Sorry for being such a PITA, but I prefer to get a clear picture on  
what the pros and cons are before people invest time in writing  
something, only to find out along the way that they have to start over  
again later.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list