[Nut-upsdev] No logging

Arnaud Quette aquette.dev at gmail.com
Sat May 21 07:59:46 UTC 2011


2011/5/20 Kiss Gabor (Bitman) <kissg at ssg.ki.iif.hu>

> > > strace shows that snmp-ups driver writes to stderr:
> > >
> > > [pid 21825] write(2, "No log handling enabled - turnin"..., 52) = 52
>
> > > However I'm unable to find this string in the source.
> > > Where it is coming from?
> > >
> >
> > from the net snmp library itself.
>
> Oh...
> :)
> Bingo!
> /usr/lib64/libnetsnmp.so.15
>

I never got time to hunt that one, but if you have some...

the solution should be around snmp_disable_stderrlog ():
http://www.net-snmp.org/dev/agent/group__snmp__logging.html

adding one (or several?) of these to snmp-ups->nut_snmp_init() will clear
out things.
note that a proper implementation will keep stderr enabled according to the
driver's debug level.

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20110521/2007a595/attachment.html>


More information about the Nut-upsdev mailing list