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 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