簡介
本文介紹如何通過簡單網路管理協定(SNMP)實用程式監控聚合服務路由器1000(ASR 1000)CPU。
必要條件
需求
Cisco建議您瞭解SNMP組態。
採用元件
本文中的資訊係根據以下軟體和硬體版本:
- Cisco IOS® XE
- ASR1000
- SNMP
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
有多種方法和命令可用於監控ASR1000 CPU,因此始終監控它非常重要。SNMP是用於監控ASR1000系統CPU的實用程式之一。您可以在本文中找到各種show命令輸出和SNMP walk結果。
問題:如何將show命令輸出與SNMP結果關聯到監控ASR1000 CPU?
在本文檔中,您可以看到如何監控駐留在ASR1000路由器上的不同模組(如路由處理器(RP)、擴展服務處理器(ESP)和SPA介面處理器(SIP))的CPU。
解決方案
要監控的CPU有兩種:
1.控制平面CPU — 在RP、ESP和SIP上可用。
2.資料平面CPU — 在量子流處理器(QFP)上可用(駐留在ESP上)
用於監控ASR1000 CPU的show命令清單
控制平面CPU:
- show proc cpu sorted | ex 0.00
- show processes cpu platform sorted
- show platform software status control-processor brief
- show process cpu platform location <R0/F0/0>
資料平面CPU:
- show platform hardware qfp active datapath utilization
將SNMP OID與show命令關聯
使用show proc cpu sorted時 | ex 0.00,生成的輸出如下:
ASR1002#show proc cpu sorted | ex 0.00
CPU utilization for five seconds: 51%/0%; one minute: 44%; five minutes: 25%
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
274 140997 2976 47378 50.55% 32.66% 17.41% 0 IP RIB Update
124 147354 10279 14335 0.64% 0.07% 0.01% 0 Per-minute Jobs
411 191924 4812122 39 0.08% 0.03% 0.05% 0 MMA DB TIMER
This command only shows processes inside the IOS daemon.
Please use 'show processes cpu platform sorted'
to show processes from the underlying operating system.
LAPTOP ~ % snmpwalk -v2c -c cisco 10.197.219.243 1.3.6.1.4.1.9.2.1.56
snmpwalk -v2c -c cisco 10.197.219.243 1.3.6.1.4.1.9.2.1.57
snmpwalk -v2c -c cisco 10.197.219.243 1.3.6.1.4.1.9.2.1.58
SNMPv2-SMI::enterprises.9.2.1.56.0 = INTEGER: 51
SNMPv2-SMI::enterprises.9.2.1.57.0 = INTEGER: 44
SNMPv2-SMI::enterprises.9.2.1.58.0 = INTEGER: 25
LAPTOP ~ %
使用show processes cpu platform sorted時,生成的輸出如下:
ASR1006#show processes cpu platform sorted
CPU utilization for five seconds: 51%, one minute: 12%, five minutes: 6%
Core 0: CPU utilization for five seconds: 59%, one minute: 17%, five minutes: 7%
Pid PPid 5Sec 1Min 5Min Status Size Name
--------------------------------------------------------------------------------
6843 5579 53% 9% 1% S 159371264 smand
3139 1688 3% 2% 1% R 49434624 hman
ASR1006#
LAPTOP ~ % snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.3.7
snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.4.7
snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.5.7
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.3.7 = Gauge32: 51
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.4.7 = Gauge32: 12
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.5.7 = Gauge32: 6
LAPTOP ~ %
使用show platform software status control-processor brief時,產生的輸出如下:
ASR1006#show platform software status control-processor brief | sec Load
Load Average
Slot Status 1-Min 5-Min 15-Min
RP0 Healthy 0.49 0.26 0.09
ESP0 Healthy 0.17 0.08 0.18
SIP0 Healthy 0.00 0.00 0.00
ASR1006-1#
LAPTOP ~ % snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.24
snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.25
snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.26
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.24.1 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.24.7 = Gauge32: 49
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.24.9 = Gauge32: 17
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.25.1 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.25.7 = Gauge32: 26
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.25.9 = Gauge32: 8
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.26.1 = Gauge32: 0
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.26.7 = Gauge32: 9
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.26.9 = Gauge32: 18
LAPTOP ~ %
在這裡,它獲取SIP/RP/ESP CPU的輸出1分鐘、5分鐘和15分鐘。訂單為SIP、RP和ESP。
使用show process cpu platform location <R0/F0/0>時,生成的輸出如下:
ASR1006#show process cpu platform location R0
CPU utilization for five seconds: 3%, one minute: 10%, five minutes: 7%
Core 0: CPU utilization for five seconds: 3%, one minute: 10%, five minutes: 7%
Pid PPid 5Sec 1Min 5Min Status Size Name
ASR1006#show process cpu platform location F0
CPU utilization for five seconds: 21%, one minute: 22%, five minutes: 22%
Core 0: CPU utilization for five seconds: 21%, one minute: 21%, five minutes: 22%
Pid PPid 5Sec 1Min 5Min Status Size Name
ASR1006#show process cpu platform location 0
CPU utilization for five seconds: 1%, one minute: 2%, five minutes: 1%
Core 0: CPU utilization for five seconds: 1%, one minute: 2%, five minutes: 1%
Pid PPid 5Sec 1Min 5Min Status Size Name
--------------------------------------------------------------------------------
1 0 0% 0% 0% S 2203648 init
2 0 0% 0% 0% S 0 kthreadd
LAPTOP ~ % snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.6
snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.7
snmpwalk -v2c -c cisco 10.197.219.245 1.3.6.1.4.1.9.9.109.1.1.1.1.8
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.6.1 = Gauge32: 1
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.6.7 = Gauge32: 3
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.6.9 = Gauge32: 21
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.1 = Gauge32: 2
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.7 = Gauge32: 10
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.9 = Gauge32: 22
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.8.1 = Gauge32: 1
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.8.7 = Gauge32: 7
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.8.9 = Gauge32: 22
LAPTOP ~ %
此處以SIP、RP和ESP的順序給出輸出,分別持續5秒、1分鐘和5分鐘。在雙RP/ESP平台中,您可以使用活動RP/ESP。例如,如果ESP1處於活動狀態,則該命令必須是show process cpu platform location F1。您也可以使用show process cpu platform location <RP/FP> active命令,但這僅適用於RP/ESP。對於SIP,您必須特別提到位置(插槽)。
使用show platform hardware qfp active datapath utilization時,生成的輸出如下:
ASR1002#show platform hardware qfp active datapath utilization
CPP 0: Subdev 0 5 secs 1 min 5 min 60 min
Input: Priority (pps) 7 6 6 6
(bps) 3936 3832 3840 3384
Non-Priority (pps) 28241 28259 28220 6047
(bps) 14459200 14468448 14448584 3095664
Total (pps) 28248 28265 28226 6053
(bps) 14463136 14472280 14452424 3099048
Output: Priority (pps) 1 1 1 0
(bps) 1040 1056 1064 408
Non-Priority (pps) 27894 28049 17309 3372
(bps) 8484592 8539056 5276496 1034552
Total (pps) 27895 28050 17310 3372
(bps) 8485632 8540112 5277560 1034960
Processing: Load (pct) 1 1 1 0
ASR1002#
LAPTOP ~ % snmpwalk -v2c -c cisco 10.197.219.243 1.3.6.1.4.1.9.9.715.1.1.6.1.14
SNMPv2-SMI::enterprises.9.9.715.1.1.6.1.14.9027.1 = Gauge32: 1
SNMPv2-SMI::enterprises.9.9.715.1.1.6.1.14.9027.2 = Gauge32: 1
SNMPv2-SMI::enterprises.9.9.715.1.1.6.1.14.9027.3 = Gauge32: 1
SNMPv2-SMI::enterprises.9.9.715.1.1.6.1.14.9027.4 = Gauge32: 0
LAPTOP ~ %
在此輸出中,如果存在多個Subdevs,則給出負載的平均輸出。
摘要
指令 |
SNMP OID |
show proc cpu sorted | ex 0.00 |
1.3.6.1.4.1.9.2.1.56
1.3.6.1.4.1.9.2.1.57
1.3.6.1.4.1.9.2.1.58
|
show processes cpu platform sorted |
1.3.6.1.4.1.9.9.109.1.1.1.1.3.7
1.3.6.1.4.1.9.9.109.1.1.1.1.4.7
1.3.6.1.4.1.9.9.109.1.1.1.1.5.7
|
show platform software status control-processor brief |
1.3.6.1.4.1.9.9.109.1.1.1.1.24
1.3.6.1.4.1.9.9.109.1.1.1.1.25
1.3.6.1.4.1.9.9.109.1.1.1.1.26
|
show process cpu platform location <R0/F0/0> |
1.3.6.1.4.1.9.9.109.1.1.1.1.6
1.3.6.1.4.1.9.9.109.1.1.1.1.7
1.3.6.1.4.1.9.9.109.1.1.1.1.8
|
show platform hardware qfp active datapath utilization |
1.3.6.1.4.1.9.9.715.1.1.6.1.14
|