Re: Net SNMP usage problem with prior installation

"Pranesh Kulkarni" <[email protected]>
Newsgroups gmane.network.net-snmp.devel,gmane.network.net-snmp.user
Message-ID <[email protected]>
another configuration file "snmptrapd.conf" for traps  . You can checkout
for the traps.

Pranesh

On Wed, Sep 10, 2008 at 4:19 PM, Mohan M <[email protected]> wrote:

> Hi Mike,
>
> Thanks for quick feedback. Yes I was doing some configuration mistake and
> would like to share with you.
>
> Net-SNMP has two types of configuration files which are snmp.conf and
> snmpd.conf. The mistake with my configuration was I had put everything
> everywhere (to avoid any problem).
> So I had both snmp.conf and snmpd.conf having same content. With this when
> the snmpd daemon is started it was throwing "unknown tokens" for all which
> were present in snmp.conf.
>
> After removing the unwanted lines from snmp.conf, I did not get any such
> unknown token warnings.
>
> Regards,
> Mohan
>
> --- On *Mon, 9/8/08, Mike Ayers <[email protected]>* wrote:
>
> From: Mike Ayers <[email protected]>
> Subject: RE: Net SNMP usage problem with prior installation
> To: [email protected], [email protected]
> Cc: [email protected]
> Date: Monday, September 8, 2008, 6:17 PM
>
>
> > From: [email protected]
> > [mailto:[email protected]] On
> > Behalf Of Mohan M
> > Sent: Friday, September 05, 2008 4:52 PM
>
> > I am sorry if I am writing such a lengthy mail,
>
> 	...and repeating it.  Weekend ain't the busy time on a technical mailing
> list, y'know...
>
> > but thought
> > it would be helpful for others who might be facing similar problems.
>
> 	Could be.  You certainly won't hear me complain about detailed
> explanations and supporting evidence.
>
> > I observed some problem while installing NET-SNMP on Linux
> > system. I could find solution to some of my problems by
> > searching the mail archives. But I am not sure of whether I
> > have done it properly or not
>
> 	Good start.
>
> > Problem1: NET-SNMP always started with older version
> > When I run /etc/init.d/snmpd start, in the /var/log/messages
> > it always used to say NET SNMP started 5.1...
> > But I did the complete installation for 5.4.2 (No problem
> > with ./configure + make + make install)
>
> 	This means that you already had a net-snmp installation before you installed
> the new one.  It appears that installation was installed as part of the OS,
> which means that components were not installed in the same place as the default
> install, and therefore are not overwritten by the new install.  You must remove
> the OS installed snmp, preferrably before installing the new version.
>
> > To overcome this problem, I tried to put this path in snmpd
> > (/etc/init.d/snmpd) /usr/local/bin path instead of /usr/sbin
> > which had my old snmpd binary.
>
> 	That might work for some things, but it is unlikely that all processes will
> pick up a pathing that puts /usr/local/bin ahead of /usr/sbin.
>
> > After this when i start snmpd, I see in the /var/log/messages
> > the daemon started in version 5.4.2
> >
> > My question are?
> >
> > a) will this approach cause any problem?
>
> 	Yep.
>
> > b) How can I completely remove my old NET-SNMP installation
> > which is somewhere 5.1..
>
> 	That's OS dependent, but look for your system package manager (yum, pkg,
> ports, etc.).  The entry is typically titlewd "snmp",
> "net-snmp", or "snmpd".
>
> > c) Why doesn't NET-SNMP installation remove or rewrite old
> > snmpd/snmptrapd binaries which are pre-existing in the
> > system? Or copy these binaries /usr/sbin in addition to other
> > destination.
>
> 	Early experiments in package auto-removal in unix style systems were
> disastrous.  It was realized that only the system operator (that's you)
> knows whether or not the package should be removed.
>
> > (Anyway two instances of net-snmp can not exist)
>
> 	Yes they can, if you know what you're doing.
>
> > Problem 2: All tokens are displayed as unknown
> >
> > After doing this if I invoke snmpd I get warning for all
> > tokens as unknown (like rocommunity, rwcommunity,
> > defalutmonitor, linkupdownnotofication, proc... and the list
> > continues)
> > Why I am gettting this? If I list the list of installed
> > modules, I get a huge list. I think there is basic module
> > which is missing? But could not figure which module is that.
>
> 	My guess is that /usr/local/bin/snmpd (isn't it /usr/local/sbin/snmpd?) is
> linking to the libraries in /usr/lib instead of /usr/local/lib.  Did you even
> add /usr/local/lib to your dynamic library path environment variable?
>
> 	Get rid of that old install and try again.
>
> > Problem 3: Understanding the complex world of SNMP configuration
>
> 	Everyone has this problem...
>
> > First of all I did not understand the difference b/w
> > snmp.conf and snmpd.conf? Can someone tell whats the
> > significance of these two files.
>
> 	The snmp.conf file applies to command line tools only, i.e. snmp commands and
> applications, not agents.  The snmpd.conf files (there are two) apply to snmpd
> only.  The snmptrapd.conf file applies to snmptrapd only.
>
> > Why do we need two seperate files.
>
> 	Simple - different apps have different purposes.  It is the two snmpd.conf
> files that will really drive you nuts.
>
> > Whats the difference b/w SNMP daemon and SNMP agent running
> > on the system.
>
> 	They are the same thing - "daemon" is the unix term and
> "agent" is the SNMP term.
>
> > One more strange observation is that net snmp requires the
> > above configuration files in many locations as told in FAQ.
> > Sometimes these files are overwritten by daemon/agent (I
> > really dont know) and the files become "socket files" with
> > the following content
> > There is no such file or device.
>
> 	Sounds like misconfiguration or bad linkage.
>
>
> 	HTH,
>
> Mike
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.