Re: [snmp agnet] Cannot find module (IP-MIB)
"Tako Chang" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2007/12/17, Dave Shield <[email protected]>: > > On 17/12/2007, Tako Chang <[email protected]> wrote: > > but when I import some private MIBs and write down my code > > something strange happened to me. > > > > Initialize STBMgnt MIB //these two are my private mib and > I > > Initialize STBStats MIB // print these lines in > init_stbmgnt() > > and init_stbstats() > > So the agent is at least picking up your local extensions. > > > > Cannot find module (IP-MIB): At line 0 in (none) > > Cannot find module (IF-MIB): At line 0 in (none) > > That looks as if the MIB files have not been properly installed. > How did you install your recompiled agent? > a (top level) "make install" should install the MIB files > automatically. > Copying libraries/binaries by hand would not. > > > > /usr/local/share/snmp/snmpd.conf: line 77: Warning: Unknown > > token: syslocation. > > /usr/local/share/snmp/snmpd.conf: line 78: Warning: Unknown > > token: syscontact. > > /usr/local/share/snmp/snmpd.conf: line 79: Warning: Unknown > > token: sysname. > > > That looks as if you've omitted some of the standard MIB modules. > > > > > my develop steps are > > (1) Edit my private MIBs > > (2) Write .h and .c code ( I don't use mib2c script but reference the > > system_mib.c code) > > (3) put them into ${PRJPATH}/agent/mibgroup > > (4) modify mib_module_inits.h > > (5) modify mib_module_include.h > > (6) modify Makefiles (agent and agent/mibgroup) > > As has already been mentioned, the usual procedure would be > to run > configure --with-mib-modules=yourPrivateMib > > That would set up the Makefiles and mib_module_*.h files > automatically. The files you have identified are in fact the > correct ones to tweak. (And I will admit to doing this myself > on occasion). > But without seeing the exact settings for these files, > it's impossible to comment on why things aren't working. > > The safest is definitely to set things up via configure. > > Dave Thanks , The configure is good to use, but when I tried to add "--with-ldflags" and "--with-libs" to link my dynamic libraries ( libmyapi.so). I found I can't finish without .la files because the configured Makefile will use LIBTOOL to generate library and executable files. But I only have .so files. So, I modified Makefile Do you have some advices for me? Jack ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users