snmprealwalk questions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hello group,

I am using snmprealwalk() to scan for interface types and descriptions on  
some Cisco routers. What I am doing is two calls to walk the routers; one  
walk for ifDescr.x and the other for locIfDescr.x so that I get the  
interface index and our user defined descriptions.

That returns back two arrays which I then combine into one array with a  
couple for and while loops, and that gives me a multidimentional array  
containing the interface index, interface type, and the description. Things  
have been going well, however, I have noticed that some of the newer routers  
are not behaving as expected on some of the walks that I am doing.

When I do the two walks as described above, I get something like this:

Array (
    [OLD-CISCO-INTERFACES-MIB::locIfDescr.1] => "Local LAN"
    [OLD-CISCO-INTERFACES-MIB::locIfDescr.2] => ""
    [OLD-CISCO-INTERFACES-MIB::locIfDescr.3] => ""
    [OLD-CISCO-INTERFACES-MIB::locIfDescr.6] => "Internal Modem WIC"
    [OLD-CISCO-INTERFACES-MIB::locIfDescr.7] => ""

Notice how it is missing interface descriptions for interface index 4 and 5.  
So I manually ran snmpget and I get the snmp error "No Such Instance  
currently exists at this OID". The problem is that snmprealwalk() doesn't  
fill the array when I get the "No such instance" message - which really  
screws up my program.

Is there a way to make snmprealwalk() fill in values in arrays, even if  
there is no valid snmp data?

Thanks in advance,

AJ Schroeder  

Site Timeline