Ok, I tried it again.
I moved my "OC-STB-HOST-MIB.txt" MIB text file from the default
"/usr/local/share/snmp/mibs/" directory and placed it into my special directory
"/export/home/myname/snmp/usr/local/share/snmp/mibs/" instead.
I started the agent using the following command:
/export/home/myname/snmp/usr/local/sbin/snmpd -f -L -Dread_config -M localhost &
Based on the "-Dread_config" data displayed when the agent started up, it looks
like the "snmp.conf" file (as well as the other snmpd.conf file) is being found
and read correctly. However, when I try to perform the "snmpwalk", it produces
the following error:
ocStbHostAVInterfaceTable: Unknown Object Identifier (Sub-id not found: (top)
-> ocStbHostAVInterfaceTable)
*** Now, if I move the OC-STB-HOST-MIB.txt file back into the
"/usr/local/share/snmp/mibs/" default directory location and then execute the
exact same "snmpwalk" command, then everything works fine. This lets me
believe the "mibdirs" line in the "snmp.conf" file is not really working
properly.
Here is the contents of my "snmp.conf" file:
###########################################################################
#
# snmp.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: Textual mib parsing
#
# This section controls the textual mib parser. Textual
# mibs are parsed in order to convert OIDs, enumerated
# lists, and ... to and from textual representations
# and numerical representations.
# mibdirs: Specifies directories to be searched for mibs.
# Adding a '+' sign to the front of the argument appends the new
# directory to the list of directories already being searched.
# arguments: [+]directory[:directory...]
mibdirs +/export/home/rosent1/snmp/usr/local/share/snmp/mibs
# mibs: Specifies a list of mibs to be searched for and loaded.
# Adding a '+' sign to the front of the argument appends the new
# mib name to the list of mibs already being searched for.
# arguments: [+]mibname[:mibname...]
mibs +OC-STB-HOST-MIB:DOCS-IF-MIB:CLAB-DEF-MIB:DOCS-IETF-BPI2-MIB
Here is the output displayed when starting the agent with the "-Dread_config"
option:
[EMAIL PROTECTED] net-snmp-5.4]# /export/home/myname/snmp/usr/local/sbin/snmpd
-f -L -Dread_config -M localhost &
[1] 31640
[EMAIL PROTECTED] net-snmp-5.4]# 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: /var/net-snmp/snmpd.conf: No such file or directory
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
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: /var/net-snmp/snmpd.conf: No such file or directory
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 316065958
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 1
read_config: storing: oldEngineID 0x80001f88807036f77a67cf5546
NET-SNMP version 5.4
Wes Hardaker <[EMAIL PROTECTED]> wrote: >>>>> "NH" == Need Help writes:
NH> I would be more interested in knowing why the "--with-mibdirs"
NH> configure option does nto work and why adding the "mibdirs" line
NH> to the snmp.conf does not work either.
Both should work. I'm not sure what the problem with the
--with-mibdirs flag, as it should work (but to be honest, I'm not sure
the last time it was tested).
For the snmp.conf file, make sure that it's being read. Run the agent
or app with -Dread_config to make sure it's being read.
--
Wes Hardaker
Sparta, Inc.
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
-------------------------------------------------------------------------
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