Today in the check server is found in the messages log there are many shapes such as last message repeated N times. As follows:
June 2 19:43:46 server repeated 7 times
June 2 19:44:47 server repeated 3 times
June 2 19:46:17 server repeated 5 times
June 2 19:47:23 server repeated 7 times
June 2 19:48:41 server repeated 5 times
June 2 19:50:37 server repeated 3 times
June 2 19:51:52 server repeated 6 times
June 2 19:53:00 server repeated 6 times
June 2 19:54:01 server repeated 7 times
June 2 19:55:21 server repeated 6 times
June 2 19:56:42 server repeated 8 times
June 2 19:57:54 server repeated 5 times
June 2 19:59:10 server repeated 3 times
This information is related to the records that are generated when the cacti is snmpd to crawl data. Get a general idea of the reason for the last message repeated N-times information. As for its role, it is simply to shield unnecessary duplication of information, the feeling is not very useful, look also annoying. The true repetition is the information above the last message repeated n times, so that when you go back to the beginning of the article, you can guess that there are a lot of last messages repeated n in this article. The reason for the Times is that there is an IP constant connection snmpd service, and no other log information is inserted in the middle.
I want to filter out all these logs. If it is centos to modify the/ETC/INIT.D/SNMPD.
Looking at the snmpd startup script/etc/init.d/snmpd, you will find that the following parameters are set:
The code is as follows |
Copy Code |
options= "-lsd-lf/dev/null-p/var/run/snmpd.pid-a" |
Through the man snmpd and man Snmpcmd found the role of-LSD parameters is to the syslog journal, no big use, directly remove:
The code is as follows |
Copy Code |
options= "-lf/dev/null-p/var/run/snmpd.pid-a" |
Don't forget to restart the service after the change:/etc/init.d/snmpd restart
One solution is similar .
Check it out. This information represents the number of repetitions of the previous warning, from which the message is turned up until a hint is found
AVAHI-DAEMON[3982]: Invalid query packet.
The meaning of this is probably related to MDNs, and my main application is not much related. So he turned the Avahi-daemon off.
The code is as follows |
Copy Code |
/etc/init.d/avahi-daemon stop Chkconfig Avahi-daemon off |
Since then, there is no such annoying last message repeated N/var/log/message