[Nut-upsdev] new variable

Stuart D. Gathman stuart at bmsi.com
Thu Oct 1 21:12:30 UTC 2009


On Thu, 1 Oct 2009, Kiss Gabor (Bitman) wrote:

> In the last two weeks I wrote two different versions of this script you mean.
> (This is why I renewed the UPS::Nut Perl module.)
> 
> However I was unsatisfied with it. (It is complicated to monitor
> and upsd produces tons of log messages if I continously modify
> RW variables.)
> One of my colleagues who is responsible for software
> architecture _defintely_ asked me to create a driver instead.

I think a simulation driver is a good idea.  IMO, however, you should
keep simulation parameters in a separate config file from driver parameters.
Also create a utility to tell your simulated UPS about simulated events
like "increase load by 5amps" or "line power drops to 85V".  Make
the nut interface exactly like a real driver, with no simulation
parameters in the nut interface.

If it were me, I would write the UPS simulator in python (or your favorite
dynamic script language), wrapping common nut code as needed to communicate
with upsd.  Then you can easily add complex simulation behaviour in
a high level script language.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.



More information about the Nut-upsdev mailing list