On Wed, 2009-09-16 at 21:25 -0500, EYRE Bernadette wrote: > > Hello Dave and net-snmp Coders, > > > I was under the impression that the snmpwalk command, given the root > oid, it will walk entire tree. > Is this true?
No, as you have noticed. > I'm running snmpwalk from a specfied MIB root node, say system. > > I'm running net-snmp 5.4.2.1 version for Linux my snmpwalk command is: > snmpwalk -Os -v 1 -c public localhost system > and the result are: > > > sysDescr.0 = STRING: "Linux cmm 2.6.29.6 #9 Thu Sep 10 11:44:52 PDT > 2009 i686" ... > sysORUpTime.8 = Timeticks: (1) 0:00:00.01 > > > I'm running the command from the same machine where the snmpd is > running and MIBS and MIBDIRS env are set. > > I started the snmpd with -f, -Dsnmp_agent and Lo options set to > observe the behaviour. > Here is my snmpd command: > > /sbin/snmpd -f -Dsnmp_agent -V -a -c /usr/local/etc/snmp/snmpd.conf > -x /var/agentx/master -Lo > > Studying the trace it seems that snmpd stops when the start oid > changes from what it was set before. It is not snmpd who stops, it is snmpwalk that stop asking. > Here is the tail end of the trace: > > Received SNMP packet(s) from UDP: [127.0.0.1]->[127.0.0.1]:-13692 > GETNEXT message > -- SNMPv2-MIB::sysORUpTime.8 > snmp_agent: agent_sesion 0x84b1ae8 created > snmp_agent: add_vb_to_cache(0x84b1ae8, 1, SNMPv2-MIB::sysORUpTime.8, > 0x805b478) > snmp_agent: tp->start SNMPv2-MIB::sysORUpTime, tp->end > SNMPv2-MIB::sysOREntry.5, > snmp_agent: add_vb_to_cache(0x84b1ae8, 1, SNMPv2-MIB::sysORUpTime.8, > 0x805b550) > snmp_agent: tp->start SNMPv2-MIB::sysOREntry.5, tp->end IF-MIB::ifNumber, > snmp_agent: add_vb_to_cache(0x84b1ae8, 1, SNMPv2-MIB::sysORUpTime.8, > 0x80be228) > snmp_agent: tp->start IF-MIB::ifNumber, tp->end IF-MIB::ifTable, > snmp_agent: REMOVE session == 0x84b1ae8 > snmp_agent: agent_session 0x84b1ae8 released > snmp_agent: end of handle_snmp_packet, asp = 0x84b1ae8 When snmpwalk get a return value that fails to match the original walue it stops. This is what most snmpwalk programs do. In the case of Net-SNMP you can, with a sufficiently new snmpwalk, give the -CE <oid> option to explicitly give the oid after the last one that interests you. /MF ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
