Discussion:
MIBS=ALL not needed?
(too old to reply)
dan anderson
2009-06-09 22:58:33 UTC
Permalink
A few places in the docs it is mentioned that MIBS=ALL is needed to
denote that all mib files (normally in /usr/local/share/snmp/mibs/)
should be loaded. Alternately, individual mibs can be specified
instead of the ALL keyword. In my testing, library calls to
snmp_parse_oid parse the mibs in that directory correctly without MIBS
being set at all in the environment. Are the docs outdated? Or is that
env variable only checked by compiled apps, and not by the library?

Cheers,
-Dan
Wes Hardaker
2009-06-09 23:56:59 UTC
Permalink
da> A few places in the docs it is mentioned that MIBS=ALL is needed to
da> denote that all mib files (normally in /usr/local/share/snmp/mibs/)
da> should be loaded. Alternately, individual mibs can be specified
da> instead of the ALL keyword. In my testing, library calls to
da> snmp_parse_oid parse the mibs in that directory correctly without MIBS
da> being set at all in the environment. Are the docs outdated? Or is that
da> env variable only checked by compiled apps, and not by the library?

MIBs are loaded:

1) based on the MIBS variable if present
2) based on the -m command line option that most tools support. This
may contain a "+" at the beginning to add to the default list.
3) based on the default MIBS setting determined at compile time.
Running "net-snmp-config --default-mibs" will tell you what this
default setting is.
4) dynamically if it can be determined. EG, if you type in a OID
somewhere and it's prefixed with the MIB name followed by "::" then
it'll try and load that MIB right then. EG:

# snmpwalk localhost FOO-MIB::fooTable

Will try and load the FOO-MIB
--
Wes Hardaker
Please mail all replies to net-snmp-***@lists.sourceforge.net
dan anderson
2009-06-10 00:09:08 UTC
Permalink
Aha, I hadn't changed --default-mibs. That's it. Thanks kindly!

-Dan
da> A few places in the docs it is mentioned that MIBS=3DALL is needed to
da> denote that all mib files (normally in /usr/local/share/snmp/mibs/)
da> should be loaded. Alternately, individual mibs can be specified
da> instead of the ALL keyword. In my testing, library calls to
da> snmp_parse_oid parse the mibs in that directory correctly without MIBS
da> being set at all in the environment. Are the docs outdated? Or is that
da> env variable only checked by compiled apps, and not by the library?
1) based on the MIBS variable if present
2) based on the -m command line option that most tools support. =A0This
=A0 may contain a "+" at the beginning to add to the default list.
3) based on the default MIBS setting determined at compile time.
=A0 Running "net-snmp-config --default-mibs" will tell you what this
=A0 default setting is.
4) dynamically if it can be determined. =A0EG, if you type in a OID
=A0 somewhere and it's prefixed with the MIB name followed by "::" then
=A0 # snmpwalk localhost FOO-MIB::fooTable
=A0 Will try and load the FOO-MIB
--
Wes Hardaker
---------------------------------------------------------------------------=
---
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing =

server and web deployment.
http://p.sf.net/sfu/businessobjects

Loading...