I thought you always had to do a "make install" to generate the true snmpd 
master agent executable, otherwise I thought the "snmpd" was just a script.   

I always perform a "make install" and then copy stuff over to the target 
machine and use it.

I use the "--with-install-prefix" option to indicate where the files should be 
placed on our host machine and also use the "--prefix" option to indicate where 
the files will be located on our target machine.   This way I can "install" 
stuff on our host machine in a nice out-of-the-way location and then I can copy 
everything over to the standard "/usr/local" directory on our target machine.



Kapil Sharma <[EMAIL PROTECTED]> wrote: Hi,

I am trying to run net-snmp 5.4 on an embedded mips linux platform. My 
development is on an x-86 linux host, and I compile using a cross compiler 
called mips-linux-uclibc-gcc-3.3.6 

This is what I did:

For NET-SNMP:
1. ./configure --host=x86-linux --target=mips-linux 
--with-cc=mips-linux-uclibc-gcc-3.3.6 --with-ar=mips-linux-ar 
--with-endianness=big --disable-debugging --enable-mini-agent 
--without-kmem-usage --disable-mib-loading --disable-applications 
--disable-manuals --disable-scripts --with-cflags=-Os  --without-openssl 
--with-out-transports=TCP,Unix,Callback --with-out-mib-modules=snmpv3mibs 
--disable-embedded-perl --disable-perl-cc-checks --without-perl-modules
2. make
3. I do not do a "make install" because I do not want to install net-snmp on 
the host machine, but the target machine. So I copy  
.../agent/.libs/snmpd
../snmplib/.libs/libnetsnmp.so.15
.../agent/.libs/libnetsnmpagent.so.15
../agent/helpers/.libs/libnetsnmphelpers.so.15
.../agent/.libs/libnetsnmpmibs.so.15
to my target and create a soft link for all of them i.e. 
libnetsnmp.so.15.0.0. -> libnetsnmp.so.15
libnetsnmpagent.so.15.0.0 -> libnetsnmp.so.15
libnetsnmphelpers.so.15.0.0.-> libnetsnmphelpers.so.15
libnetsnmpmibs.so.15.0.0.-> libnetsnmpmibs.so.15

For Agent:
1. I compile my agent file snmpAgent.cpp containing routines to handle SNMP 
traps, to create snmpAgent.o.
2. I compile nstAgentPluginObject.cpp to create nstAgentPluginObject.o
3. I compile nstAgentPluginObject.o and snmpAgent.o to create shared object 
libnstAgentPluginObject.so
4. I copy libnstAgentPluginObject.so to my target (for ease of running, in the 
same directory).

Running it all on target:
1. I create a file snmpd.conf on the target, that contains the line to  launch 
my nstAgentPluginObject:
dlmod nstAgentPluginObject /libnstAgentPluginObject.so
2. I launch the snmpd, in either of two ways, and this is the error I get:

# snmpd -V -f -L -Ddlmod
registered debug token dlmod, 1
Warning: no access control information configured.
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file for 
this agent.
Error opening specified endpoint ""
Server Exiting with code 1
#

I think I get this error message because the snmpd does not have an snmpd.conf 
file. So I do the following:

# snmpd -V -f -L -Ddlmod -c snmpd.conf
registered debug token dlmod, 1
getaddrinfo: public Name or service not known
snmpd: create_trap_session:
snmpd.conf: line 71: Error: cannot create trapsink: public
snmpd.conf: line 84: Warning: Unknown token: severityFilter.
snmpd.conf: line 97: Warning: Unknown  token: throttleMask.
snmpd.conf: line 108: Warning: Unknown token: throttleFreq.
snmpd.conf: line 127: Warning: Unknown token: proc.
snmpd.conf: line 142: Warning: Unknown token: disk.
snmpd.conf: line 156: Warning: Unknown token: load.
snmpd.conf: line 161: Warning: Unknown token: dlmod.
Error opening specified endpoint ""
Server Exiting with code 1
#

Can someone help me understand what's wrong?

Thanks,

Kapil
        

---------------------------------
Choose the right car based on your needs.   Check out Yahoo! Autos new Car 
Finder tool. 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  
http://get.splunk.com/_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


       
---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to