We have /usr/sbin/snmpd (version 4.2.3) running on our Sun servers. I
would like to add a module. Apparently this can be done without
rebuildnig /usr/sbin/snmpd by building the new module as a "dynamic
module" and loading it at runtime.
I believe I have been successful building the module and now have a
file: ourModule.so in (I included a printf("Hello from init!\n"); in the
init_module() method in the module.
I added the following to the snmpd.conf file (I placed the ourModule.so
in /myDirectory as well as the snmpd.conf file):
dlmod ourModule /myDirectory/ourModule.so
I then started the agent:
/usr/sbin/snmpd -c /myDirectory/snmpd.conf -C
I did not see the "Hello from init" message. When I queried for the mib
elements in ourModule, I got no response. When I queried sysDescr.0 I
got the following response "system.sysDescr.0 = SunOS ourSunBox 5.8
Generic_117350-05 sun4u" so I know the agent is running.
I looked at your tutorial on Dynamic Module Creation and saw some other
suggestions so I tried the following:
/usr/sbin/snmpd -c /myDirectory/snmpd.conf -C -H
dlopen failed: ld.so.1: /usr/sbin/snmpd: fatal: libit_dynany_sc53.so.5:
open failed: No such file or directory
/home/gst9338/snmpd.conf: line 44: Warning: Unknown token:
debugSatcommStatus.
Configuration directives understood:
In snmpd.conf and snmpd.local.conf:
dlmod module-name module-path
/usr/sbin/snmpd -c /myDirectory/snmpd.conf -C -f -L -DourModule,dlmod
dlmod: register mib
dlmod: dlmod_path: /usr/lib/snmp/dlmod
dlmod: dlmod_create_module
dlmod: dlmod_load_module ourModule: /myDirectory/ourModule.so
dlopen failed: ld.so.1: /usr/sbin/snmpd: fatal: libit_dynany_sc53.so.5:
open failed: No such file or directory
Is this failure to load libit_dynany_sc53.so.5 important??
I then tried as suggested in your turorial:
snmpset -v 2c -c public localhost UCD-DLMOD-MIB::dlmodStatus.1 i create
Error in packet.
Reason: notWritable
Failed object:
enterprises.ucdavis.ucdExperimental.ucdDlmodMIB.dlmodTable.dlmodEntry.dl
modStatus.1
Is there something else I need to try to get this module to load?
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders