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 17 March 2010 23:24, Wei Zheng <[email protected]> wrote: > Regarding your questions: > 1) Cannot walk lmPlTable correctly either: it returns " No Such Object available on this agent at this OID". What about GET requests on individual entries? Please report the *exact* commands and responses that you get. (Vague reports of "it doesn't work" aren't a lot of help) > 2) I registered lmPl, very similar code as dlmod is registered in dlmod.c. Grrr... If I ask to see what the code is, there's usually a reason for it. Saying that it's "Very similar" to something else is not much help, and is simply irritating. I don't have time to waste guessing what you might or might not have done! Please - what does the registration code actually look like? > 3) When I snmpwalk ... nsModuleName, it returns " No Such Object available on this agent at this OID". Hmmm... that's unfortunate. And unexpected. It should be part of any Net-SNMP agent, unless it's been compiled/configured in an unusual manner. Did you compile the agent yourself, or is it a vendor-supplied one? What do the access control settings look like? What does "snmpgetnext ... nsModuleName" return? > I am wondering, what is the difference on query mibs between agentX and dynamic load? Dynamic loading makes your new MIB module part of the same running process as the master agent. Once it's been successfully loaded, then everything works the same as if it had been compiled into the agent binary in the first place. AgentX is a protocol by which the master agent can talk to a separate process (potentially running on a different host) and retrieve management information from there. Think of the difference between shared libraries and RPC calls in conventional programming. > Same code (mib structure, register and etc.) works for agentX, not dynamic load. The Net-SNMP agent has been deliberately designed so that the same MIB handling code should work for an AgentX subagent, a dynamically loaded module, or a statically compiled one. Yes - you are experiencing a problem with dynamic loading, but the same code *ought* to work regardless. > More notes: > 1) During "snmpwalk lmPl", when callback routine (used when the object is queried) is called, > for dynamic load, the name passed to the function is the lmPl_oid; > for agentX, the name passed to the function is lmPlNumber oid {lmPl_oid 1}. (1 is the sub-components for lmPlNumber.) > Question: What makes the difference? Does this matter? I have no idea. Without seeing the registration code, I can only guess what might be happening, > 2) In agentX, when snmpwalk lmPl, snmp_agent logged something like, > =============================================== > snmp_agent: varbind 1 is inclusive > snmp_agent: inclusive range(s) in getNext > =============================================== > While dynamic load does not have these logs. Of course not. Because AgentX is an inter-process protocol, which uses a similar protocol request structure (including a varbind payload) to SNMP. A dynamically loaded module is part of the SNMP agent binary, so doesn't need an inter-process protocol. A more sensible comparison would be with the debugging messages logged by a statically-compiled MIB module. > Question: What is varbind for? See above > Does this "inclusive set" matter? No - because you're not using AgentX. Anything relating to that protocol is irrelevant. > 3) I assume having "AgentX master support" tuned on does not affect > dynamic load functionalities. Correct. 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