SNMP::Info::CiscoStats - Perl5 Interface to CPU and Memory stats for Cisco Devices
Max Baker (max@warped.org)
max@warped.org
# 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";
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.
none.
MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
Returns ios_cpu() or cat_cpu(), whichever is available.
Returns ios_cpu_1min() or cat_cpu1min(), whichever is available.
Returns ios_cpu_5min() or cat_cpu5min(), whichever is available.
Returns mem_free() + mem_used()
Trys to parse if device is running IOS or CatOS from description()
Trys to parse device operating system version from description()
Current CPU usage in percents of device.
1.3.6.1.4.1.9.2.1.56.0 = OLD-CISCO-CPU-MIB:avgBusyPer
Average CPU Usage in percents of device over last minute.
1.3.6.1.4.1.9.2.1.57.0
Average CPU Usage in percents of device over last 5 minutes.
1.3.6.1.4.1.9.2.1.58.0
CISCO-PROCESS-MIB::cpmCPUTotal5sec.9
CISCO-PROCESS-MIB::cpmCPUTotal1min.9
CISCO-PROCESS-MIB::cpmCPUTotal5min.9
Main DRAM free in device. In bytes.
CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree.1
Main DRAM used in device. In bytes.
CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed.1
None.
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.