[CentOS] snmpd log messages

Mon May 21 19:15:45 UTC 2007
rs at centos.spam.futz.org <rs at centos.spam.futz.org>

On Sun, 20 May 2007 15:01:25 -0600 Paul wrote:
PRG> Note that the OPTIONS= line indicates that smnpd starts with both -Lsd 
PRG> and -Lf /dev/null. As a result a ps auxww shows:
PRG> 
PRG> root     19645  0.0  0.2 12340 4436 ?        S    12:05   0:00 
PRG> /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a
PRG> 
PRG> and apparently the -Lsd overrides the -Lf /dev/null so everything gets 
PRG> logged. If I create a /etc/sysconfig/snmpd.options file containing:
PRG> 
PRG> OPTIONS="-LS 4 d -p /var/run/snmpd.pid -a"
PRG> 
PRG> then only warnings or worse are logged to /var/log/messages and the 
PRG> useless connection messages get suppressed.

snmpd can have multiple output destinations. The '-Lf /dev/null' was to disable
the default log file, because snmpd used to always open it, even if other log
types were specified. Newer releases don't open the default log file unless
no other logging method is specified, so the '-Lf /dev/null' can (and should)
be dropped...

-- 
"No sense being pessimistic.  It wouldn't work anyway."
- Phillip Mueller