blank.gif (43 bytes)

Church Of The
Swimming Elephant

dns | icmp | ietf | ined | inet | job | map | mib | netdb | ntp | snmp | sunrpc | syslog | term | udp

snmp# walk varName vbl body
snmp# walk vbl script

The snmp# walk session command walks a whole MIB sub-tree. The command repeats sending getbulk requests until the returned varbind list is outside of the sub-tree rooted at the varbind list vbl.

The first version of the walk command is synchronous. For each valid varbind list retrieved from the agent, the Tcl script body is evaluated. 

Before evaluation of body starts, the actual varbind list is assigned to the variable named varName. 

Below is a simple example that prints the two columns ifDescr and ifType of the interface table:

$s walk x “IF-MIB!ifDescr IF-MIB!ifType” {
    puts “[snmp value $x 0] ([snmp value $x 1])”

The second version of the walk command is asynchronous. For each valid varbind list retrieved from the agents, the callback script script is evaluated. 

Substitutions of % escape sequences take place as described above and scripts are always evaluated at global level. 

The script is called with an error status set to endOfWalk and an empty varbind list when the walk terminates. 

Below is the asynchronous version of the example which prints the two columns ifType and ifDescr of the interface table:

$s walk “IF-MIB!ifDescr IF-MIB!ifType” {
if {”%E” == “noError”} { 
    puts [subst {[snmp value “%V” 0] ([snmp value “%V” 1])}]


Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

Have you gone to church today?
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609