[Nut-upsuser] Help with nut 2.0.4, MGE Ellipse 1000 and FreeBSD
Arjen de Korte
nut+users at de-korte.org
Tue Jan 2 15:00:29 CET 2007
>> More generally, I'll start a discussion about the driver polling rate
>> (2 sec) which was accurate with the dumb and old smart units, but
>> which is really too high for recent / verbose units (that also support
>> an interrupt / notification mechanism, allowing to lower the polling
>> rate, while not missing events).
> That is a no-brainer. We already support changing the polling rate through
> the -i command line option for the drivers. Just advise people to set this
> to 30 seconds or so for the drivers in question and we should be fine.
Or by adding 'pollinterval = 30' in 'ups.conf' for these drivers once it
has been determined that this is the cause of the problems.
Alternatively, we could remove the 'static' from
static unsigned int poll_interval = 2;
in 'drivers/main.c' and add
static unsigned int poll_interval;
to 'drivers/main.h' so that driver authors can set this value to a more
sensible default for their driver if the UPS is known not to handle the
two second polling interval that is default now.
I wouldn't want to see the default changed to a higher value for backwards
compatibility. Hammering a driver with too many polling commands will
probably show up in the logs somewhere (or otherwise give unsatisfactory
results) while silently increasing this to a higher value may mean that
power events are missed on older systems/installations. The latter may go
unnoticed until it causes a problem.
Best regards, Arjen
More information about the Nut-upsuser
mailing list