problem querying cisco switches

Michael Di Domenico <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
When i run the below code excerpt on some of my switches, sometimes I
end up with tables that are not all the same length

my $vars = new SNMP::VarList(['ifName'],['ifInOctets'],['ifOutOctets'] );
my @resp = $sess->bulkwalk(0, ($numInts + 1), $vars);

for my $vbarr ( @resp ) {
   my $oid = $$vars[$i++]->tag();
   my $num = scalar @$vbarr;
   print "$num responses for oid $oid: \n";
   for my $v (@$vbarr) {
      printf("\t%s = %s (%s)\n", $v->name, $v->val, $v->type);
   }
   print "\n";
}

For example

switch_a:
263 respones for oid ifName
263 respones for oid ifInOctets
262 respones for oid ifOutOctets

switch_b:
265 respones for oid ifName
265 respones for oid ifInOctets
263 respones for oid ifOutOctets

Does anyone know what would make either the Cisco Switch or Perl/SNMP
drop the last or last 2 entries?  The program then kicks out with an
error on undefined references when I try to print out the whole table.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.