[Nut-upsuser] [Bug 535583] Excessive logging by apcsmart program

Lupe Christoph lupe at lupe-christoph.de
Tue Feb 15 13:22:31 UTC 2011


On Tuesday, 2011-02-15 at 14:16:58 +0100, Arnaud Quette wrote:

> > I would have thought finding the place in the code where it is trying to
> > reset the UPS connection wouldn't be this hard.

> this is not the problem. This code is in the smartmode() function of
> apcsmart.c:
> http://svn.debian.org/wsvn/nut/trunk/drivers/apcsmart.c

I'll have a look at that code.

> we see the 5 attempts to go to smart mode ('Y' command), but my aim is to
> understand why it is failing, and how to cleanly solve this without
> impacting support for other units.

Of course. The problem is that the program is sending the command
infinitely, probably because of the EIO.

> Some more questions:
> - how are you handling the device's permissions?
> Refer to § II, section 3:
> http://git.debian.org/?p=collab-maint/nut.git;a=blob_plain;f=debian/nut.README.Debian;hb=HEAD

/etc/udev/rules.d/zzzlpc.rules:
KERNEL=="ttyS2",   OWNER="nut",          GROUP="nut",   MODE="0660"

The serial line is on a PCI board. It may be a problem of that board,
not the UPS. Which is cleared by closing the device.

Lupe Christoph
-- 
| It is a well-known fact in any organisation that, if you want a job    |
| done, you should give it to someone who is already very busy.          |
| Terry Pratchett, "Unseen Academicals"                                  |



More information about the Nut-upsuser mailing list