I am interested in having a subagent handle all requests for my particular MIB. 
  As a result, I am reading the tutorial entitled "Writing a SubAgent' located 
here:

  http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent

I did not think "auto-building" the subagent using the "net-snmp-config 
--compile-subagent" option was the most common way of creating a subagent (am I 
wrong?) so I decided to read the "Instrumenting your own code with agentx 
subagent support" section of this tutorial.

I downloaded the required files (as recommended):

  Makefile
  NET-SNMP-TUTORIAL-MIB.txt
  example-demon.c
  nstAgentSubagentObject.c
  nstAgentSubagentObject.h

I was not sure where to put these files, so I created the following directory 
and placed them into this location:

 .../agent/mibgroup/nstAgentSubagentObject/


I performed the "make example-demon" command successfully and updated my 
"snmpd.conf" file to include the "master agentx" line as well.  

1) I then tried to fire up the snmpd master agent but it will not start.  I am 
trying to start it using the following command:

     /export/home/myname/snmp/usr/local/sbin/snmpd -f &

If I remove the "master agentx" line from the "snmpd.conf" file then it will 
start, but this can not be done since I need to inform master agent that 
subagents will be registering with it.  Of course, putting the "master agentx" 
line back in results in the "snmpd" master agent failing to start again.  

Any idea what I am doing wrong?  Why I can not start the master agent when the 
"master agentx" line is included?

2) I am not sure how the "example-demon" subagent is actually related to the 
"NET-SNMP-TUTORIAL-MIB.txt" MIB file at all.   I am assuming this tutorial is 
supposedly showing me how a subagent (ie: example-demon) can be created to 
handle all snmp requests for a particular MIB file (ie: the 
"NET-SNMP-TUTORIAL-MIB.txt" MIB file), but I do not see how the subagent is 
ever associated with a MIB file at all.  

If my assumptions are correct, then how does a subagent become associated with 
a MIB file?










       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
-------------------------------------------------------------------------
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

Reply via email to