NAME

SNMP::Info::CiscoStats - Perl5 Interface to CPU and Memory stats for Cisco Devices

AUTHOR

Max Baker (max@warped.org)

SYNOPSIS

# Let SNMP::Info determine the correct subclass for you. 
my $ciscostats = new SNMP::Info(
                         AutoSpecify => 1,
                         Debug       => 1,
                         # These arguments are passed directly on to SNMP::Session
                         DestHost    => 'myswitch',
                         Community   => 'public',
                         Version     => 2
                       ) 
   or die "Can't connect to DestHost.\n";

my $class      = $ciscostats->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";

DESCRIPTION

SNMP::Info::CiscoStats is a subclass of SNMP::Info that provides cpu, memory, os and version information about Cisco Devices.

Use or create in a subclass of SNMP::Info. Do not use directly.

Inherited Classes

none.

Required MIBs

CISCO-PROCESS-MIB
CISCO-MEMORY-POOL-MIB
RFC1213-MIB

MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz

GLOBALS

$ciscostats->cpu()

Returns ios_cpu() or cat_cpu(), whichever is available.

$ciscostats->cpu_1min()

Returns ios_cpu_1min() or cat_cpu1min(), whichever is available.

$ciscostats->cpu_5min()

Returns ios_cpu_5min() or cat_cpu5min(), whichever is available.

$ciscostats->mem_total()

Returns mem_free() + mem_used()

$ciscostats->os()

Trys to parse if device is running IOS or CatOS from description()

$ciscostats->os_ver()

Trys to parse device operating system version from description()

$ciscostats->ios_cpu()

Current CPU usage in percents of device.

1.3.6.1.4.1.9.2.1.56.0 = OLD-CISCO-CPU-MIB:avgBusyPer

$ciscostats->ios_cpu_1min()

Average CPU Usage in percents of device over last minute.

1.3.6.1.4.1.9.2.1.57.0

$ciscostats->ios_cpu_5min()

Average CPU Usage in percents of device over last 5 minutes.

1.3.6.1.4.1.9.2.1.58.0

$ciscostats->cat_cpu()

Current CPU usage in percents of device.

CISCO-PROCESS-MIB::cpmCPUTotal5sec.9

$ciscostats->cat_cpu_1min()

Average CPU Usage in percents of device over last minute.

CISCO-PROCESS-MIB::cpmCPUTotal1min.9

$ciscostats->cat_cpu_5min()

Average CPU Usage in percents of device over last 5 minutes.

CISCO-PROCESS-MIB::cpmCPUTotal5min.9

$ciscostats->mem_free()

Main DRAM free in device. In bytes.

CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree.1

$ciscostats->mem_used()

Main DRAM used in device. In bytes.

CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed.1

TABLE METHODS

None.