I successfully cross-compiled the snmpd master agent and was able to start the 
snmpd master agent on our hardware box.  At least I see it running as a process.

Here is the configure which was used for the master agent:

./configure \
--prefix=$(BUILDROOT)/usr/local \
--srcdir=$(BUILDROOT)/netsnmp \
--with-default-snmp-version="3" \
--with-sys-contact="contact" \
--with-sys-location="location" \
--with-logfile="$(BUILDROOT)/var/log/snmpd.log" \
--with-persistent-directory="$(BUILDROOT)/var/net-snmp" \
--disable-embedded-perl \
--without-perl-modules \
--host=mipsel-uclibc-linux \
--with-cc=mipsel-uclibc-g++ \
--with-linkcc=mipsel-uclibc-g++ \
--with-cflags="-x c" \
--with-ldflags="-x none" \
--with-endianness=little;


I then was able to successfully cross-compile my subagent (ie: 
ocStbHostMib_subagent) as well, however, when I start the subagent on our 
hardware box, I get the following errors:

[/usr/local/bin #] ocStbHostMib_subagent -f &

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)

Warning: Failed to connect to the agentx master agent ([NIL]):
ocStbHostMib_subagent is up and running.


I believe these errors are caused because the subagent can not find the correct 
MIB files it needs, however, I am wondering why the "subagent" is looking for 
these MIB files at all.   The subagent was compiled against code which was 
generated from the "OC-STB-HOST-MIB.txt" MIB file using the mib2c tool.   I 
would think the subagent would only be related to the OC-STB-HOST-MIB only, so 
I am not sure why these other MIB errors are showing up when I try to start the 
subagent. 

NOTE: If I compile the master agent and subagent for use in the PC environment 
(ie: not cross-compiling), then the master agent and subagent can be started 
fine without any errors and SNMP queries can be performed for the subagent 
successfully.

I looked at the MIB file names above and it seems the MIB files which are 
causing the errors are the MIBs which come with the NetSNMP package.   I am 
assuming I did not copy something to our hardware box in which the agent needs. 
 Am I missing some data which is required to be copied on our hardware box to 
make this run correctly?

The data which I copied to our hardware box environment include:

- The complete "/usr/local/" tree contents
- The subagent executable (ie: "ocStbHostMib_subagent")


Questions:
1) Why does running the subagent results in MIB file errors in which the 
subagent should not care about?

2) How can I get rid of these errors?  Am I missing some files which should be 
copied over?

3) I also noticed the subagent is not connecting to the master agent in our 
hardware box environment.  The "snmpd.conf" file does have the "master agentx" 
text in it.  Possibly the subagent is not connecting to the master agent 
because of the same reason which is causing all the MIB file errors?

PS:  I know I am ultimately going to be using the "--with-out-mib-modules" 
option when configuring the master agent to reduce the number of MIBs being 
supported (since I only need to process the OC-STB-HOST-MIB), but in the 
meantime I am curious why these errors are occurring.









 
---------------------------------
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to