My snmp.conf file has the following two lines:
mibdirs +/export/home/myname/snmp/usr/local/share/snmp/mibs
mibs +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
My snmpd.conf file has the following one basic line:
rocommunity mycommunity_ro
I opened a brand new Root shellw window and performed the following commands:
1) I ran the following configuration commands:
a)./configure \
--prefix=/export/home/myname/snmp/usr/local \
--srcdir=/export/home/myname/snmp/net-snmp-5.4 \
--enable-embedded-perl \
--enable-shared \
--with-mib-modules="OC-STB-HOST-MIB"
b) make
c) make install
2) I started the master agent by executing the following:
/export/home/myname/snmp/usr/local/sbin/snmpd -f -L -Dread_config -M
localhost &
The following output (note the BOLD text) were produced indicating it could not
find any of the MIB files, although it did seem it read my ".conf" files
correctly:
registered debug token read_config, 1
read_config: reading premib configuration tokens
read_config: config path used for
snmpd:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
(persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmpd.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmpd.local.conf: No
such file or directory
read_config: Reading configuration
/export/home/myname/snmp/usr/local/share/snmp/snmpd.conf
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmpd.conf:31
examining: rocommunity mycommunity_ro
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmpd.local.conf: No
such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmpd.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmpd.local.conf: No
such file or directory
read_config: /root/.snmp/snmpd.conf: No such file or directory
read_config: /root/.snmp/snmpd.local.conf: No such file or directory
read_config: config path used for snmpd:/var/net-snmp (persistent
path:/var/net-snmp)
read_config: Reading configuration /var/net-snmp/snmpd.conf
read_config: /var/net-snmp/snmpd.conf:32 examining: setserialno 316065965
read_config: /var/net-snmp/snmpd.conf:44 examining: ifXTable .1 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:45 examining: ifXTable .2 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:46 examining: ifXTable .3 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:47 examining: ifXTable .4 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:51 examining: engineBoots 8
read_config: /var/net-snmp/snmpd.conf:52 examining: oldEngineID
0x80001f88807036f77a67cf5546
read_config: Found a parser. Calling it: oldEngineID /
0x80001f88807036f77a67cf5546
read_config: /var/net-snmp/snmpd.local.conf: No such file or directory
read_config: config path used for
agentx:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
(persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/agentx.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/agentx.local.conf: No
such file or directory
read_config: /export/home/myname/snmp/usr/local/share/snmp/agentx.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/share/snmp/agentx.local.conf:
No such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/agentx.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/agentx.local.conf: No
such file or directory
read_config: /root/.snmp/agentx.conf: No such file or directory
read_config: /root/.snmp/agentx.local.conf: No such file or directory
read_config: config path used for agentx:/var/net-snmp (persistent
path:/var/net-snmp)
read_config: /var/net-snmp/agentx.conf: No such file or directory
read_config: /var/net-snmp/agentx.local.conf: No such file or directory
read_config: config path used for
snmp:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
(persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmp.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmp.local.conf: No
such file or directory
read_config: Reading configuration
/export/home/myname/snmp/usr/local/share/snmp/snmp.conf
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.conf:30
examining: mibdirs +/export/home/myname/snmp/usr/local/share/snmp/mibs
read_config: Found a parser. Calling it: mibdirs /
+/export/home/myname/snmp/usr/local/share/snmp/mibs
read_config:initmib: using mibdirs:
+/export/home/myname/snmp/usr/local/share/snmp/mibs
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.conf:37
examining: mibs +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
read_config: Found a parser. Calling it: mibs /
+OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
read_config:initmib: using mibs:
+OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.local.conf: No
such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmp.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmp.local.conf: No
such file or directory
read_config: /root/.snmp/snmp.conf: No such file or directory
read_config: /root/.snmp/snmp.local.conf: No such file or directory
read_config: config path used for snmp:/var/net-snmp (persistent
path:/var/net-snmp)
read_config: /var/net-snmp/snmp.conf: No such file or directory
read_config: /var/net-snmp/snmp.local.conf: No such file or directory
Cannot find module (OC-STB-HOST-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)
Cannot find module (OC-STB-HOST-MIB): At line 0 in (none)
Cannot find module (DOCS-IF-MIB): At line 0 in (none)
Cannot find module (CLAB-DEF-MIB): At line 0 in (none)
Cannot find module (DOCS-IETF-BPI2-MIB): At line 0 in (none)
read_config: reading normal configuration tokens
read_config: config path used for
snmpd:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
(persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmpd.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmpd.local.conf: No
such file or directory
read_config: Reading configuration
/export/home/myname/snmp/usr/local/share/snmp/snmpd.conf
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmpd.conf:31
examining: rocommunity mycommunity_ro
read_config: Found a parser. Calling it: rocommunity / mycommunity_ro
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmpd.local.conf: No
such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmpd.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmpd.local.conf: No
such file or directory
read_config: /root/.snmp/snmpd.conf: No such file or directory
read_config: /root/.snmp/snmpd.local.conf: No such file or directory
read_config: config path used for snmpd:/var/net-snmp (persistent
path:/var/net-snmp)
read_config: Reading configuration /var/net-snmp/snmpd.conf
read_config: /var/net-snmp/snmpd.conf:32 examining: setserialno 316065965
read_config: Found a parser. Calling it: setserialno / 316065965
read_config: /var/net-snmp/snmpd.conf:44 examining: ifXTable .1 14:0 18:0x $
read_config: Found a parser. Calling it: ifXTable / .1 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:45 examining: ifXTable .2 14:0 18:0x $
read_config: Found a parser. Calling it: ifXTable / .2 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:46 examining: ifXTable .3 14:0 18:0x $
read_config: Found a parser. Calling it: ifXTable / .3 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:47 examining: ifXTable .4 14:0 18:0x $
read_config: Found a parser. Calling it: ifXTable / .4 14:0 18:0x $
read_config: /var/net-snmp/snmpd.conf:51 examining: engineBoots 8
read_config: Found a parser. Calling it: engineBoots / 8
read_config: /var/net-snmp/snmpd.conf:52 examining: oldEngineID
0x80001f88807036f77a67cf5546
read_config: /var/net-snmp/snmpd.local.conf: No such file or directory
read_config: config path used for
agentx:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
(persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/agentx.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/agentx.local.conf: No
such file or directory
read_config: /export/home/myname/snmp/usr/local/share/snmp/agentx.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/share/snmp/agentx.local.conf:
No such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/agentx.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/agentx.local.conf: No
such file or directory
read_config: /root/.snmp/agentx.conf: No such file or directory
read_config: /root/.snmp/agentx.local.conf: No such file or directory
read_config: config path used for agentx:/var/net-snmp (persistent
path:/var/net-snmp)
read_config: /var/net-snmp/agentx.conf: No such file or directory
read_config: /var/net-snmp/agentx.local.conf: No such file or directory
read_config: config path used for
snmp:/export/home/myname/snmp/usr/local/etc/snmp:/export/home/myname/snmp/usr/local/share/snmp:/export/home/myname/snmp/usr/local/lib/snmp:/root/.snmp
(persistent path:/var/net-snmp)
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmp.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/etc/snmp/snmp.local.conf: No
such file or directory
read_config: Reading configuration
/export/home/myname/snmp/usr/local/share/snmp/snmp.conf
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.conf:30
examining: mibdirs +/export/home/myname/snmp/usr/local/share/snmp/mibs
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.conf:37
examining: mibs +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
read_config: /export/home/myname/snmp/usr/local/share/snmp/snmp.local.conf: No
such file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmp.conf: No such
file or directory
read_config: /export/home/myname/snmp/usr/local/lib/snmp/snmp.local.conf: No
such file or directory
read_config: /root/.snmp/snmp.conf: No such file or directory
read_config: /root/.snmp/snmp.local.conf: No such file or directory
read_config: config path used for snmp:/var/net-snmp (persistent
path:/var/net-snmp)
read_config: /var/net-snmp/snmp.conf: No such file or directory
read_config: /var/net-snmp/snmp.local.conf: No such file or directory
read_config: storing: #
# net-snmp (or ucd-snmp) persistent data file.
#
############################################################################
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
# **** DO NOT EDIT THIS FILE ****
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
############################################################################
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
# (Did I mention: do not edit this file?)
#
read_config: storing: setserialno 316065966
read_config: storing:
##############################################################
read_config: storing: #
# snmpNotifyFilterTable persistent data
#
read_config: storing:
##############################################################
read_config: storing:
read_config: storing:
##############################################################
read_config: storing: #
# ifXTable persistent data
#
read_config: storing: ifXTable .1 14:0 18:0x $
read_config: storing: ifXTable .2 14:0 18:0x $
read_config: storing: ifXTable .3 14:0 18:0x $
read_config: storing: ifXTable .4 14:0 18:0x $
read_config: storing:
##############################################################
read_config: storing:
read_config: storing: engineBoots 9
read_config: storing: oldEngineID 0x80001f88807036f77a67cf5546
NET-SNMP version 5.4
If I set the MIBS enviroment variable to ALL (shown below), then all the errors
go away and the master agent starts with no problems. I can then perform GET
and SNMPWALK requests and the MIB details are displayed. Without this only
the MID OID numbers are dislpayed.
export MIBS=ALL
Question:
1) Why are the MIB errors produced when starting the master agent?
2) Why must I set the MIBS environment variable at all if the "snmp.conf" file
indicates which MIBS should be included?
PS: Just to be complete I wanted to indicate that I am using the "snmpwalk"
command which comes with NetSNMP to execute the walk request:
/export/home/myname/snmp/usr/local/bin/snmpwalk -v1 -c mycommunity_ro localhost
ocStbHostAVInterfaceTable
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders