1SNMP::Info::CiscoStats(U3s)er Contributed Perl DocumentatSiNoMnP::Info::CiscoStats(3)
2
3
4
6 SNMP::Info::CiscoStats - Perl5 Interface to CPU and Memory stats for
7 Cisco Devices
8
10 Eric Miller, Max Baker, Sam Stickland
11
13 # Let SNMP::Info determine the correct subclass for you.
14 my $ciscostats = new SNMP::Info(
15 AutoSpecify => 1,
16 Debug => 1,
17 # These arguments are passed directly on to SNMP::Session
18 DestHost => 'myswitch',
19 Community => 'public',
20 Version => 2
21 )
22 or die "Can't connect to DestHost.\n";
23
24 my $class = $ciscostats->class();
25 print "SNMP::Info determined this device to fall under subclass : $class\n";
26
28 SNMP::Info::CiscoStats is a subclass of SNMP::Info that provides cpu,
29 memory, os and version information about Cisco Devices.
30
31 Use or create in a subclass of SNMP::Info. Do not use directly.
32
33 Inherited Classes
34 None.
35
36 Required MIBs
37 CISCO-PRODUCTS-MIB
38 CISCO-PROCESS-MIB
39 CISCO-MEMORY-POOL-MIB
40 SNMPv2-MIB
41 OLD-CISCO-SYSTEM-MIB
42 CISCO-STACK-MIB
43 CISCO-ENTITY-VENDORTYPE-OID-MIB
44 CISCO-FLASH-MIB
45 ENTITY-MIB
46 CISCO-IMAGE-MIB
47
49 $ciscostats->cpu()
50 Returns ios_cpu() or cat_cpu(), whichever is available.
51
52 $ciscostats->cpu_1min()
53 Returns ios_cpu_1min() or cat_cpu1min(), whichever is available.
54
55 $ciscostats->cpu_5min()
56 Returns ios_cpu_5min() or cat_cpu5min(), whichever is available.
57
58 $ciscostats->mem_total()
59 Returns mem_free() + mem_used()
60
61 $ciscostats->vendor()
62 'cisco'
63
64 $ciscostats->os()
65 Tries to parse if device is running 'IOS', 'CatOS', 'IOS-XE' or
66 something else from description()
67
68 Available values:
69
70 'ios' for Cisco IOS
71 'ios-xe' for Cisco IOS XE
72 'ios-xr' for Cisco IOS XR
73 'pix' for Cisco PIX
74 'asa' for Cisco ASA
75 'fwsm' for Single-mode FWSM
76 'fwsm-admin' for Admin context of multi-context FWSM
77 'fwsm-context' for Standard context of multi-context FWSM
78 'ace-admin' for Admin context of ACE module
79 'ace-context' for Standard context of ACE module (NB: No OS version
80 detection is available, but will be the same as it's
81 'ace admin')
82 'css' for Cisco Content Switch
83 'css-sca' for Cisco Content Switch Secure Content Acceleration
84 'san-os' for Cisco SAN-OS
85
86 $ciscostats->os_ver()
87 Tries to parse device operating system version from description(),
88 falls back to parsing "CISCO-IMAGE-MIB::ciscoImageString" if needed
89
90 $ciscostats->os_bin()
91 Tries to parse "ROMMON" version from rom_id() string
92
93 $ciscostats->ios_cpu()
94 Current CPU usage in percent.
95
96 1.3.6.1.4.1.9.2.1.56.0 = "OLD-CISCO-CPU-MIB:avgBusyPer"
97
98 $ciscostats->ios_cpu_1min()
99 Average CPU Usage in percent over the last minute.
100
101 1.3.6.1.4.1.9.2.1.57.0
102
103 $ciscostats->ios_cpu_5min()
104 Average CPU Usage in percent over the last 5 minutes.
105
106 1.3.6.1.4.1.9.2.1.58.0
107
108 $ciscostats->cat_cpu()
109 Current CPU usage in percent.
110
111 "CISCO-PROCESS-MIB::cpmCPUTotal5sec.9"
112
113 $ciscostats->cat_cpu_1min()
114 Average CPU Usage in percent over the last minute.
115
116 "CISCO-PROCESS-MIB::cpmCPUTotal1min.9"
117
118 $ciscostats->cat_cpu_5min()
119 Average CPU Usage in percent over the last 5 minutes.
120
121 "CISCO-PROCESS-MIB::cpmCPUTotal5min.9"
122
123 $ciscostats->mem_free()
124 Main DRAM free of the device in bytes.
125
126 "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree"
127
128 $ciscostats->mem_used()
129 Main DRAM used of the device in bytes.
130
131 "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed"
132
133 $ciscostats->mem_total()
134 Main DRAM of the device in bytes.
135
136 "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree" +
137 "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed"
138
139 $ciscostats->flashmem_total()
140 Flash memory of the device in bytes.
141
142 "CISCO-FLASH-MIB::ciscoFlashDeviceSize"
143
145 Cisco Memory Pool Table ("ciscoMemoryPoolTable")
146 $ciscostats->cisco_mem_free()
147 The number of bytes from the memory pool that are currently unused
148 on the managed device.
149
150 ("ciscoMemoryPoolFree")
151
152 $ciscostats->cisco_mem_used()
153 The number of bytes from the memory pool that are currently in use
154 by applications on the managed device.
155
156 ("ciscoMemoryPoolUsed")
157
158 Cisco Flash Device Table ("ciscoFlashDeviceTable")
159 $ciscostats->cisco_flash_size()
160 Total size of the Flash device. For a removable device, the size
161 will be zero if the device has been removed.
162
163 ("ciscoFlashDeviceSize")
164
165 Cisco Image Table ("ciscoImageTable")
166 $ci->ci_images()
167 Returns the table of image strings.
168
169 "ciscoImageString"
170
171
172
173perl v5.32.1 2021-01-27 SNMP::Info::CiscoStats(3)