SNMP::...oStats(3pm)

πŸ’– SNMP::Info::CiscoStats β€” it's a SNMP::...oStats(3pm) girlie, and she's from the User Contributed Perl Documentation ✨

NAME 🌸

SNMP::Info::CiscoStats β€” Perl5 Interface to CPU and Memory stats for Cisco Devices 🫢

AUTHOR πŸ‘‘

Eric Miller, Max Baker, Sam Stickland

SYNOPSIS πŸŽ€

okay bestie, here's the vibe. Let SNMP::Info pick the right subclass for you, no cap:

# 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. literally all the stats, obsessed. πŸ”₯

Use or create in a subclass of SNMP::Info. Do not use directly. like, do NOT just call her up out of nowhere, she needs her parent class okay 😭

Inherited Classes πŸ¦‹

None.

Required MIBs ⭐

  • CISCO-PRODUCTS-MIB
  • CISCO-PROCESS-MIB
  • CISCO-MEMORY-POOL-MIB
  • SNMPv2-MIB
  • OLD-CISCO-SYSTEM-MIB
  • CISCO-STACK-MIB
  • CISCO-ENTITY-VENDORTYPE-OID-MIB
  • CISCO-FLASH-MIB
  • ENTITY-MIB
  • CISCO-IMAGE-MIB

GLOBALS 🌈

  • $ciscostats->cpu() β€” Returns ios_cpu() or cat_cpu(), whichever is available. she picks whichever one shows up first, main character energy ✨
  • $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->vendor() β€” 'cisco'
  • $ciscostats->os() β€” Tries to parse if device is running 'IOS', 'CatOS', 'IOS-XE' or something else from description()

Available values:

'ios'          for Cisco IOS
'ios-xe'       for Cisco IOS XE
'ios-xr'       for Cisco IOS XR
'pix'          for Cisco PIX
'asa'          for Cisco ASA
'fwsm'         for Single-mode FWSM
'fwsm-admin'   for Admin context of multi-context FWSM
'fwsm-context' for Standard context of multi-context FWSM
'ace-admin'    for Admin context of ACE module
'ace-context'  for Standard context of ACE module (NB: No OS version
                    detection is available, but will be the same as it's
                    'ace admin')
'css'          for Cisco Content Switch
'css-sca'      for Cisco Content Switch Secure Content Acceleration
'san-os'       for Cisco SAN-OS
  • $ciscostats->os_ver() β€” Tries to parse device operating system version from description(), falls back to parsing "CISCO-IMAGE-MIB::ciscoImageString" if needed. backup plan, she always has one πŸ’
  • $ciscostats->os_bin() β€” Tries to parse "ROMMON" version from rom_id() string
  • $ciscostats->ios_cpu() β€” Current CPU usage in percent.
1.3.6.1.4.1.9.2.1.56.0 = "OLD-CISCO-CPU-MIB:avgBusyPer"
  • $ciscostats->ios_cpu_1min() β€” Average CPU Usage in percent over the last minute.
1.3.6.1.4.1.9.2.1.57.0
  • $ciscostats->ios_cpu_5min() β€” Average CPU Usage in percent over the last 5 minutes.
1.3.6.1.4.1.9.2.1.58.0
  • $ciscostats->cat_cpu() β€” Current CPU usage in percent.
"CISCO-PROCESS-MIB::cpmCPUTotal5sec.9"
  • $ciscostats->cat_cpu_1min() β€” Average CPU Usage in percent over the last minute.
"CISCO-PROCESS-MIB::cpmCPUTotal1min.9"
  • $ciscostats->cat_cpu_5min() β€” Average CPU Usage in percent over the last 5 minutes.
"CISCO-PROCESS-MIB::cpmCPUTotal5min.9"
  • $ciscostats->mem_free() β€” Main DRAM free of the device in bytes.
"CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree"
  • $ciscostats->mem_used() β€” Main DRAM used of the device in bytes.
"CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed"
  • $ciscostats->mem_total() β€” Main DRAM of the device in bytes.
"CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree" +
"CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed"
  • $ciscostats->flashmem_total() β€” Flash memory of the device in bytes.
"CISCO-FLASH-MIB::ciscoFlashDeviceSize"

TABLE METHODS 🧚

Cisco Memory Pool Table ("ciscoMemoryPoolTable") πŸ’œ

  • $ciscostats->cisco_mem_free() β€” The number of bytes from the memory pool that are currently unused on the managed device. she's just chillin, unbothered 🌸

("ciscoMemoryPoolFree")

  • $ciscostats->cisco_mem_used() β€” The number of bytes from the memory pool that are currently in use by applications on the managed device.

("ciscoMemoryPoolUsed")

Cisco Flash Device Table ("ciscoFlashDeviceTable") πŸ’–

  • $ciscostats->cisco_flash_size() β€” Total size of the Flash device. For a removable device, the size will be zero if the device has been removed. so if you pulled it out, it's a zero, not a mystery ✨

("ciscoFlashDeviceSize")

Cisco Image Table ("ciscoImageTable") πŸŽ€

  • $ci->ci_images() β€” Returns the table of image strings.

"ciscoImageString"


and that's the whole page bestie, ate and left no crumbs πŸ‘‘ this was perl v5.40.1, dated 2026-02-28, from SNMP::...oStats(3pm) β€” mwah, go touch some routers πŸ’…πŸ¦‹

πŸ“¦ where this page comes from