Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Cisco 4500 that I would like to perform network throughput monitoring on. Which OID should I be looking at to get this information? What options to I have at otherwise getting this information? Where should I look at for browsing the MIBs available on this switch?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

If your end goal is just to have and view the metrics, a tool like cacti, munin, mrtg could help you with less detail needed than asked for in your question.

That said, Cisco supports the standard MIBs to interfaces.

Each interface will be assigned an index. All of the information for the interfaces will be stored in tables. Each table is referenced by a specific OID, and the information for the specific interface in that table will be referenced by attaching the interface's index to the table's OID.

As an example, here's a script that looks up the ifIndex, ifDescr, ifAdminStatus, and ifOperStatus for every interface on a device. This example shows the oids used and the act of looking up table values based on their index. (I pulled this example out of a much larger piece of code to simplify it, so there are likely some minor bugs):

#!/usr/bin/perl

use Net::SNMP;

my %oids = (
    'ifDescr'                      => '1.3.6.1.2.1.2.2.1.2',
    'ifType'                       => '1.3.6.1.2.1.2.2.1.3',
    'ifAdminStatus'                => '1.3.6.1.2.1.2.2.1.7',
    'ifOperStatus'                 => '1.3.6.1.2.1.2.2.1.8',
);
my $device = shift || die "Need device to poll";
my $community = shift || 'public';

my($snmp,$snmp_error) = Net::SNMP->session(-hostname => $device,
                                           -community => $community);

my $info;
if (!$snmp) {
    printf STDERR ("Couldn't create snmp object for $d: $snmp_error\n");
} else {
    $info = $snmp->get_entries(-columns => [ $oids{ifDescr}, $oids{ifAdminStatus},
                                             $oids{ifOperStatus}, $oids{ifType} ]);
    if (!$info) {
        printf STDERR ("Couldn't poll $d: %s\n", $snmp->error());
    }
}

foreach my $oid (grep /^$oids{ifDescr}\./, keys(%$info)) {
  my($index) = $oid =~ m|\.(\d+)$|;
  print join(',', $device,
                  $index,
                  $info->{"$oids{ifDescr}.$index"},
                  $info->{"$oids{ifType}.$index"},
                  $info->{"$oids{ifAdminStatus}.$index"},
                  $info->{"$oids{ifOperStatus}.$index"}), "\n";
}    

All the interesting stuff is under 1.3.6.1.2.1.2.2.1, the ifEntry OID. Here's a link that explains some of the members of it, including the ones I used above and other you might be interested in, like Octet, Packets, Errors, etc

share|improve this answer

You most likely want the IfInOctets and IfOutOctets OIDs for whatever your target interface is. The Cisco SNMP Object browser will likely be of great use as you're tracking down this sort of information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.