在用redhat linux 5.2版本后,有一个问题就是有很多snmpd log信息记录在/var/log/messages里,在4u4里是不记录的,导致messages产生大量的重复信息,好多有用的信息很快就会被淹没,这里通过调整snmp debug级别解决这个问题
/var/log/message 如:
Feb 17 16:00:07 db3 last message repeated 2 times
Feb 17 16:05:02 db3 snmpd[5479]: Connection from UDP: [119.42.224.21]:48750
Feb 17 16:05:02 db3 snmpd[5479]: Received SNMP packet(s) from UDP: [119.42.224.21]:48750
Feb 17 16:05:02 db3 snmpd[5479]: Connection from UDP: [119.42.224.21]:48750
Feb 17 16:05:02 db3 snmpd[5479]: Connection from UDP: [119.42.224.21]:48750
Feb 17 16:05:07 db3 snmpd[5479]: Connection from UDP: [119.42.224.28]:53640
Feb 17 16:05:07 db3 snmpd[5479]: Received SNMP packet(s) from UDP: [119.42.224.28]:53640
Feb 17 16:05:07 db3 snmpd[5479]: Connection from UDP: [119.42.224.28]:53640
Feb 17 16:05:07 db3 last message repeated 2 times
Feb 17 16:10:01 db3 snmpd[5479]: Connection from UDP: [119.42.224.21]:48765
Feb 17 16:10:01 db3 snmpd[5479]: Received SNMP packet(s) from UDP: [119.42.224.21]:48765
Feb 17 16:10:01 db3 snmpd[5479]: Connection from UDP: [119.42.224.21]:48765
Feb 17 16:10:01 db3 snmpd[5479]: Connection from UDP: [119.42.224.21]:48765
Feb 17 16:10:21 db3 snmpd[5479]: Connection from UDP: [119.42.224.28]:54506
Feb 17 16:10:21 db3 snmpd[5479]: Received SNMP packet(s) from UDP: [119.42.224.28]:54506
Feb 17 16:10:21 db3 snmpd[5479]: Connection from UDP: [119.42.224.28]:54506
解决方法:
编辑/etc/init.d/snmpd
把:
OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"
修改成:
OPTIONS="-LS 0-4 d -Lf /dev/null -p /var/run/snmpd.pid -a"
然后/etc/rc.d/init.d/snmpd restart 重启snmp即可
作者:george.ma blog:http://blog.chinaunix.net/u/12521/
阅读(1313) | 评论(1) | 转发(0) |