[Nut-upsdev] Some questions on driver implementation and variable
names
Edgar Fuß
ef at math.uni-bonn.de
Sun Feb 25 12:24:48 CET 2007
I've just written an NUT driver to manage a Masterguard UPS connected
via USB, and some questions arose.
Why I wrote a new driver? The servers in question only have two
serial ports, so I want to use USB. I first wrote the low-level USB
routines expecting to integrate them into the existing masterguard
driver. However, that driver was so rudimentary I wrote my own one.
It can be trivially extended to talk via a serial line.
Now to my questions:
In case there is some variable (like ups.power) the UPS does not
directly exhibit, but which can be computed by other known values
(nominal power, load); should I compute and set that variable or
should I only set values directly obtained form the UPS?
There are variables for minimum and maximum observed input voltage,
but not for frequencies. Is it OK to set input.frequency.
{minimum,maximum}?
We have input.transfer.low and the like, but this UPS also gives me a
frequency range outside which it will go offline. Any variable names
for that?
Same for temeratures: We have ambient.temperature.alarm.{min,max}
imum, but nothing nike it for ups internal temperatures.
I assume battery.runtime shold give the estimated runtime under
current load. I also have nominal on-battery runtime for 100% and 50%
load. Any names for those?
When running a battery test, apart from running until empty, I can
set a time. Anything like ups.test.duration?
In case my setvar routine knows the name, but the value is illegal, I
suppose I have to return STAT_SET_UINKNOWN despite the name being
known, right?
If I accept a setvar(), do I have to dstate_setinfo() the variable or
does some generic routine do so for me?
Does "calibrate" mean to run on battery until exhausted or seomething
else?
The text for the "OB" status says "inverter is powering the load".
Despite that, I assume that with an online UPS, I'm not supposed to
always set that flag, but only when on battery, right? Am I right to
believe that "OL" and "OB" are mutually exclusive?
Finally, I'm not sure I understand the different ups.delay.*
variables correctly. When initiating a shutdown, there are two things
I can set: The duration of the countdown (e.g. time from now to power-
off) and the time from then until restarting the load (the UPS will
always auto-power-on after a line failure). I guess the later is
ups.delay.start and the former is ups.delay.reboot for
shutdown.reboot.graceful, zero for shutdown.reboot and
ups.delay.shutdown for shutdown.{return,stayoff}. Or am I getting it
wrong?
Thanks for your help.
More information about the Nut-upsdev
mailing list