The company uses javastuserver, which uses cacti for monitoring through the SNMPD Protocol. However, when viewing system logs, snmpd generates a large number of logs, sometimes turning over many screens, to see the system information. This is a nightmare for administrators who want to view system logs every day. By using the following method, you can disable snmpd to write logs to the system log file. In this way, the system log looks much simpler than root @ ubuntu :~ # Vim/et
The company uses Ubuntu Server and cacti for monitoring through the SNMPD Protocol. However, when viewing system logs, snmpd generates a large number of logs, sometimes you need to flip a lot of screens to see the system information. This is a nightmare for administrators who want to view system logs every day. By using the following method, you can disable snmpd to write logs into the system log file, so that the system log looks much simpler.
- Root @ ubuntu :~ # Vim/etc/default/snmp
-
- # This file controls the activity of snmpd and snmptrapd
-
- # Don't load any MIBs by default.
- # You might comment this lines once you have the MIBs downloaded.
- ExportMIBS=
-
- # Snmpd control (yes means start daemon ).
- SNMPDRUN=Yes
-
- # Snmpd options (use syslog, close stdin/out/err ).
- #SNMPDOPTS='-Lsd-Lf/dev/null-u snmp-g snmp-I-smux-p/var/run/snmpd. pid'// Comment out and change it to the following content
- SNMPDOPTS='-Ls2d-Lf/dev/null-p/var/run/snmpd. pid-'
After that, run the command to restart the snmpd service. Then, you can view the system logs again, which is much more refreshing.
#/Etc/init. d/snmpd restart // restart the service
Snmpd Log Level Definition:
- 0 or! -- LOG_EMERG,
- 1 or a -- LOG_ALERT,
- 2 or c -- LOG_CRIT,
- 3 or e -- LOG_ERR,
- 4 or w -- LOG_WARNING,
- 5 or n -- LOG_NOTICE,
- 6 or I -- LOG_INFO, and
- 7 or d -- LOG_DEBUG.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2