[Nut-upsdev] [Bug 535583] Excessive logging by apcsmart program
soltys at ziu.info
Thu Apr 21 16:46:28 UTC 2011
On 11-04-21 10:34, Arnaud Quette wrote:
> Hi Lupe,
> since we now have an apcsmart maintainer, I'm forwarding this issue to him.
> @Michal: could you please have a look at this issue , and give us
> your feeling?
>  https://bugs.launchpad.net/bugs/535583
> 2011/2/15 Lupe Christoph <lupe at lupe-christoph.de
> <mailto:lupe at lupe-christoph.de>>
The suggestions are pretty fine.
- flushing stale input (though at driver level)
Certainly. I even added some flushes earlier, but haven't touched the
updateinfo and/or the functions it calls yet. I'll add it along with
forthcoming patches (icanon mode and the rest). Looking at the strace,
flushing post-failure might be good idea in certain cases as well.
- reopening serial port
If the upper layers of nut don't disallow this kind of behaviour for
some reason - it's good idea as well. Should be helpful in weird cases,
and at the very least wouldn't hurt at all. If it would help in this
particular case, hard to say.
TBH, I'm not sure why it diligently tries to enter SM 5 times.
Pre-emptive flush + 'Y' + reasonable delay (icanon or not) should be all
that is necessary. If we don't succeed, next attempt shouldn't
miraculously (in theory) make much of a difference 1 second later ...
Thanks for pointing out those issues.
More information about the Nut-upsdev