Ciscoman's notes (Записки цыщика c дипломом)

I'm Cisco Champion Community member for 2017!

I'm Cisco Champion Community member for 2017!
"Cisco Champions are passionate about Cisco and happy to share our knowledge, experience, and feedback."

среда, 1 апреля 2015 г.

How to get list of processes from Cisco IOS router/switch and CPU usage per process via SNMP


With help of snmpwalk utility you can list processes and their CPU usage per-process even if router is at 100% CPU load. Use the following OIDs to list processes: 1.3.6.1.4.1.9.9.109.1.2.1.1.2.1 and this OID to list corresponding CPU usage per-process: 1.3.6.1.4.1.9.9.109.1.2.2.1.7.1
For example here is output from snmpwalk from 2811 router with 99% cpu and no SSH/telnet access because of high CPU load with appropriate retry/timeout parameters:

snmpwalk -r 9 -t 5 -v 2c -c public 10.81.1.1 1.3.6.1.4.1.9.9.109.1.2.1.1.2.1
...
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.188 = STRING: "CCVPM_HDSPRM"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.189 = STRING: "FLEX DSPRM MAIN"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.190 = STRING: "FLEX DSP KEEPALIVE MAIN"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.191 = STRING: "HDA DSPRM MAIN"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.192 = STRING: "cpf_process_msg_holdq"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.193 = STRING: "AAA Cached Server Group"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.194 = STRING: "ENABLE AAA"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.195 = STRING: "EM Background Process"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.196 = STRING: "Key chain livekeys"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.197 = STRING: "LINE AAA"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.198 = STRING: "LOCAL AAA"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.199 = STRING: "TPLUS"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.200 = STRING: "VSP_MGR"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.201 = STRING: "Crypto WUI"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.202 = STRING: "Crypto Support"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.203 = STRING: "IPSECv6 PS Proc"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.204 = STRING: "EPM MAIN PROCESS"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.205 = STRING: "CCVPM_HTSP"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.206 = STRING: "VPM_MWI_BACKGROUND"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.207 = STRING: "CCVPM_R2"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.208 = STRING: "EPHONE MWI Refresh"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.209 = STRING: "FB/KS Log HouseKeeping"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.210 = STRING: "EPHONE MWI BG Process"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.211 = STRING: "Skinny HW conference digit event"
iso.3.6.1.4.1.9.9.109.1.2.1.1.2.1.212 = STRING: "VOICE REG BG Process"
...


snmpwalk -r 9 -t 5 -v 2c -c public 10.81.1.1 1.3.6.1.4.1.9.9.109.1.2.2.1.7.1
...
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.189 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.190 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.191 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.192 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.193 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.194 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.195 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.196 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.197 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.198 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.199 = Gauge32: 87
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.200 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.201 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.202 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.203 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.204 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.205 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.206 = Gauge32: 0
iso.3.6.1.4.1.9.9.109.1.2.2.1.7.1.207 = Gauge32: 0
...

As you can see, TPLUS process is using 87% CPU. Seems it is a software defect and my IOS will be upgraded.

Постоянные читатели

Поиск по этому блогу