はじめに
このドキュメントでは、簡易ネットワーク管理プロトコル(SNMP)ユーティリティを使用してアグリゲーションサービスルータ(ASR)1000(ASR 1000)のCPUを監視する方法について説明します。
前提条件
要件
SNMP設定に関する知識があることが推奨されます。
使用するコンポーネント
このドキュメントの情報は、次のソフトウェアとハードウェアのバージョンに基づいています。
- Cisco IOS® XE
- ASR1000
- SNMP
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されました。このドキュメントで使用するすべてのデバイスは、クリアな(デフォルト)設定で作業を開始しています。本稼働中のネットワークでは、各コマンドによって起こる可能性がある影響を十分確認してください。
背景説明
ASR1000のCPUを監視するには、さまざまな方法とコマンドを使用できます。常に監視することが非常に重要になります。SNMPは、ASR1000システムのCPUを監視するユーティリティの1つです。さまざまなshowコマンドの出力とSNMP walkの結果がこの記事にあります。
問題:ASR1000のCPUをモニタするためにshowコマンドの出力をSNMPの結果と関連付ける方法
このドキュメントでは、ASR1000ルータに存在するルートプロセッサ(RP)、拡張サービスプロセッサ(ESP)、SPAインターフェイスプロセッサ(SIP)などのさまざまなモジュールのCPUの監視方法について説明します。
解決方法
監視するCPUには、次の2つのタイプがあります。
1. コントロールプレーンCPU:RP、ESP、およびSIPで使用できます。
2. データプレーンCPU:Quantum Flow Processor(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 ~ %
ここでは、5秒間、1分間、5分間の出力が、SIP、RP、ESPの順で表示されています。デュアル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 ~ %
この出力では、複数のSubdevがある場合、負荷の平均出力を示します。
要約
コマンド |
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
|