System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

/var/log/messages lots of msgs re snmpd on 127.0.0.1

 
SOLVED
Go to solution
Jane W.
Occasional Advisor

/var/log/messages lots of msgs re snmpd on 127.0.0.1

Setting up RHEL 5.2 32 bit on DL380G4 and G5.
Used ProLiant Support Pack 8.12
Noticing loads of messsages in /var/log/messages from snmpd about activity on 127.0.0.1
For sundry reasons, no HP Sim or OpenView or Nagios or...
Just want to not see the messages.
Assume there is a config file - not sure where or what to change.
5 REPLIES
Nuwan Alwis
Valued Contributor

Re: /var/log/messages lots of msgs re snmpd on 127.0.0.1

Need more info about the messages you get on the log.
is this issue started after you install PSP?
Jane W.
Occasional Advisor

Re: /var/log/messages lots of msgs re snmpd on 127.0.0.1

The system wasn't up for long with RHEL 5.2 before PSP 8.11 was installed (I had incorrectly listed 8.12 in the original post) so can't be 100% sure that is when they showed up as the older files have have aged off already.

Messages are like this:
hostname snmpd[2422]: Connection from UDP: [127.0.0.1]:34164

hostname snmpd[2422]: Received SNMP packet(s) from UDP: [127.0.0.1]:34164

and followed by ones with the last part incrementing up as 34165, 34166, etc. sometimes the first message is followed by one or more instances of

hostname last message repeated 3 times
(or 2 times or 4 times or ...)

The /var/log/messages* files are full of these messages, obscuring useful ones.

Looked at an older system with RHEL 5 set up by someone else even longer ago; it has PSP 8.0 and has much the same messages.

I have not yet found the right document to help me understand what configuration file I should change.
Maxim Revutskiy
Valued Contributor
Solution

Re: /var/log/messages lots of msgs re snmpd on 127.0.0.1

Logging level is set in start parameters, so you need to look in your starting scripts.

I'm using SUSE, so i found next line in my /etc/init.d/snmpd

startproc $SNMPD $SNMPDCONF -r -A -LF ${SNMPD_LOGLEVEL:-d} $SNMPD_LOGFILE -p /var/run/snmpd.pid $agentargs $S NMPDNOSMUX $SNMPDNOTCPWRAPPERLOG

and lines:
SNMPD_CONFIG=/etc/sysconfig/net-snmp
# Read config
. $SNMPD_CONFIG


so i looked in to /etc/sysconfig/net-snmp
and found:
## Path: System/Net-SNMP
## Description: Log level of the snmp server.
## Type: string(!,a,c,e,w,n,i,d,0,1,2,3,4,5,6,7)
## Default: d
#
# Defines the log level for the snmpd.
#
# The default is set to d (7, LOG_DEBUG)
# This reflects the default for old init script.
#
SNMPD_LOGLEVEL="d"

so i changed it to SNMPD_LOGLEVEL="1", restarted snmpd and annoing messages is no longer appears.

RH Linux must have something like this to.

P.S. Just looked into RHEL scripts
they have line
OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"
so you can set snmpd parameters in your flavor. Look to snmpd --help

Jane W.
Occasional Advisor

Re: /var/log/messages lots of msgs re snmpd on 127.0.0.1

The /etc/init.d/snmpd on RHEL 5.2 refers to a file /etc/snmp/snmpd.options and if it does not exist, uses the default you noted.

The systems did not have a file /etc/snmp/snmpd.options so I created one. To figure out the logging options I installed the net-snmp-utils RPM so I got the man page for snmpcmd and could see the conventions for the -L option. I used
"-LS 1 d -Lf /dev/null -p /var/run/snmpd.pid -a". I was doing "tail -f /var/log/messages" and restarted snmpd. And stopped getting all those annoying messages.

Thanks so much for the help.
Jane W.
Occasional Advisor

Re: /var/log/messages lots of msgs re snmpd on 127.0.0.1

solution posted in my immediately preceding post.