[Nut-upsuser] Help with nut 2.0.4, MGE Ellipse 1000 and FreeBSD

Arnaud Quette aquette.dev at gmail.com
Wed Jan 3 08:56:25 CET 2007


2007/1/2, Arjen de Korte <nut+users at de-korte.org>:
>
> >> 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.

that's why I've not yet moved on this point. backward compat is one of
my main concern with nut.

I've addressed this issue with newhidups by simply adding an internal
poll interval to know when to poll. Meanwhile, the driver simply wait
for UPS notification or calls a dataok() if there's nothing.

Arnaud
-- 
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsuser mailing list