Hi!
Once again thank you very much Dave for your constant
support.
I fixed the bug. Actually what happens is when we run
./configure it creates an DEFAULT_MIBS in net-snmp-config.h using
config_add_mib function
Whenever we run SNMP walk or SNMP get etc., init_mib function will be
executed and it looks DEFAULT_MIBS in the default directory
(/usr/share/snmp/mibs) if any of the mib is not present it calls
print_module_not_found function. So what I did is I have committed
config_add_mib functions in few *.h files so that it won't include MIB's
Which I don't require, finally DEFAULT_MIBS contains required MIB's.
Hope whatever I have done is correct, b'cos know I'm not
facing any problem by running SNMP walk or SNMP get etc. Please let me
know.
With regards,
G. Siva Prakash Reddy.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Friday, February 08, 2008 10:11 PM
To: Siva Prakash Reddy G
Cc: [email protected]
Subject: Re: error messages
On 08/02/2008, Siva Prakash Reddy G <[EMAIL PROTECTED]> wrote:
> When I execute snmpwalk -Dparse-mibs it is showing a default
> path for mibs i.e., /usr/share/snmp/mibs/
OK - that sounds like a vendor-supplied binary, rather than
one you've compiled yourself. Yes?
> 1. How snmpwalk -Dparse-mibs looking for mibs which are not
> present in /usr/share/snmp/mibs,
When the library is compiled, it includes a list of "standard" MIBs
which it will try to load by default. That's what you are seeing here.
> how can I avoid.
You have several options:
- put the MIB files back into this directory
(so that the library can find them again)
- run "snmpwalk" et al with the option -m ""
(which disables the loading of the default list)
- set the environmental variable MIBS to have the value ""
(which also disables the loading of the default list)
- create a file $HOME/.snmp/snmp.conf
(note - *not* snmpd.conf)
containing the line
mibs ""
This doesn't quite work, as it will try to look for a MIB called ""
(and complain). But that's better than complaining about
the full default list!
I've logged that problem as a bug in the project tracker system.
A simple workaround would be to install one MIB file in the
/usr/share/snmp/mibs directory, and list this MIB in your
snmp.conf file.
- Recompile the software using
./configure --with-mibs="" ...
But that's probably a bit drastic!
> 2. If I change MIB path to some other directory, whether
snmpwalk
> or SNMP get or SNMP set will parse for mibs in that crated directory
or
> it looks for default path,
Yes. If you change the search path, then the library (and hence
all the tools) will look for MIBs in that new path.
> If snmpwalk or SNMP get or SNMP set looks for mibs in
> the created directory, then hopefully I won't get error messages
If you are going to install the MIB files which you removed earlier,
why don't you just put them back into /usr/share/snmp/mibs ?
> One more thing I won't know that how specify my own mib
> directory in ./configure so that 'make install' will change a created
> directory as a default mib directory path.
./configure --with-mibdirs=/path/to/mib/dir
But that doesn't feel the right solution here. See above.
Dave
This email message and its attachments may contain CONFIDENTIAL AND PRIVILEGED
INFORMATION intended for the sole use of the addressee(s). If you have received
it in error, please contact the sender by return email, notify your system
manager and destroy the original message and any copies thereof. Any review,
use, disclosure or distribution is unlawful. Please check this email and any
attachments for the presence of viruses. The Company accepts no liability for
any damage caused by any virus transmitted by this email. The views or opinions
presented in this e-mail are solely those of the author and do not necessarily
represent those of the company.
The Company reserves the right to monitor, review and store the content of all
messages sent to or from this e-mail address.
www.aztecsoft.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders