Re: snmpwalk does not walk the table when using dynamic load.
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 19 March 2010 05:36, Wei Zheng <[email protected]> wrote: > 1) snmpwalk/GET lmPlTable, > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ > # snmpwalk -c public localhost lmPlTable > LOCAL-MIB::lmPlTable = No Such Object available on this agent at this OID > # snmpgetnext -c public localhost lmPlTable > LOCAL-MIB::lmPlStatResetStats.0 = INTEGER: 0 > # snmpwalk -c public localhost lmPlName > LOCAL-MIB::lmPlName."test1" = STRING: test1 > LOCAL-MIB::lmPlName."test2" = STRING: test2 > LOCAL-MIB::lmPlName."test3" = STRING: test3 Hmmm... So the var_lmPlTable routine is working correctly when pointed at the column object. This shows that the basic registration is OK. So we can forget about investigating problems there, and hence nsModuleName is not important any more. > # snmpget -c public localhost lmPlName."test1" > lmPlName.test1: Unknown Object Identifier (Index out of range: test1 (lmPlName)) You need to escape the quotes, so that the shell doesn't swallow them before they get to snmpget. I suspect that snmpget -c public localhost lmPlName.\"test1\" will work correctly. > 2) Registration code: > ====================================================================== > oid lmPl_variables_oid[] = > { 1, 3, 6, 1, 4, 1, 3375, 2, 2, 5, 1 }; > > struct variable4 lmPl_variables[] = { > #define LMPLNUMBER 1 > {LMPLNUMBER, ASN_INTEGER, RONLY, var_lmPl, 1, {1}}, > > #define LMPLNAME 2 > {LMPLNAME, ASN_OCTET_STR, RONLY, var_lmPlTable, 3, {2, 1, 1}}, Just to check: what does "snmpgetnext .... .1.3.6.1.4.1.3375.2.2.5.1.2" report? LOCAL-MIB::lmPlStatResetStats.0 or LOCAL-MIB::lmPlName."test1" ? Do you have any debugging code in the var_lmPlTable routine? If you enable this, and run "snmpgetnext ... lmPlTable", do you see these debug messages? Dave ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ 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