シスコサポートコミュニティ
キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

IOS-XR: SNMPによるCPU使用率モニタリング

SNMPにて CPU 使用率をモニタリングする場合、CISCO-PROCESS-MIB の以下の OID にて CPU 使用率を取得することができます。

CISCO-PROCESS-MIB

  1. cpmCPUTotal1minRev (1.3.6.1.4.1.9.9.109.1.1.1.1.7)
  2. cpmCPUTotal5minRev (1.3.6.1.4.1.9.9.109.1.1.1.1.8)

上記 cpmCPUTotal1minRev、cpmCPUTotal5minRev は CISCO-PROCESS-MIB に定義されており、

それぞれ過去 1 分間、5 分間の CPU 使用率となっています。

-------------------------------------------------------------------

cpmCPUTotal1minRev OBJECT-TYPE

        SYNTAX          Gauge32  (0..100)

        UNITS           "percent"

        MAX-ACCESS      read-only

        STATUS          current

        DESCRIPTION

                "The overall CPU busy percentage in the last 1 minute

                period. This object deprecates the object cpmCPUTotal1min

                and increases the value range to (0..100)."

        ::= { cpmCPUTotalEntry 7 }

cpmCPUTotal5minRev OBJECT-TYPE

        SYNTAX          Gauge32 (0..100)

        UNITS           "percent"

        MAX-ACCESS      read-only

        STATUS          current

        DESCRIPTION

                "The overall CPU busy percentage in the last 5 minute

                period. This object deprecates the object cpmCPUTotal5min

                and increases the value range to (0..100)."

        ::= { cpmCPUTotalEntry 8 }

-------------------------------------------------------------------

なお、show process cpu コマンドにて表示される過去 15 分間の CPU 使用率は

CISCO-PROCESS-MIB に定義されておらず未サポートとなります。

--------------------------------------------------------------------------------

RP/0/RP0/CPU0:CRS-MC#show processes cpu | exclude 0%.*0%.*0%

CPU utilization for one minute: 6%; five minutes: 6%; fifteen minutes: 6%

PID 1Min 5Min 15Min Process

28696 1% 1% 1% hd_drv

53280 1% 1% 1% eth_server

57379 2% 2% 2% qnet

--------------------------------------------------------------------------------

以下、CRS にて Net-SNMP を使って各 CPU の使用率を取得するサンプルとなります。

--------------------------------------------------------------------------------

# snmpwalk -v 2c -c private <A.B.C.D> cpmCPUTotalTable

CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.2 = INTEGER: 2359704
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.18 = INTEGER: 10154515
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.514 = INTEGER: 7858209
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.4162 = INTEGER: 134949328
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.4163 = INTEGER: 185280579
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.4610 = INTEGER: 156036026
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.4626 = INTEGER: 198577469
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.983554 = INTEGER: 1508476423
CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex.983570 = INTEGER: 1520228812
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.2 = Gauge32: 2 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.18 = Gauge32: 2 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.514 = Gauge32: 6 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.4162 = Gauge32: 1 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.4163 = Gauge32: 1 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.4610 = Gauge32: 2 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.4626 = Gauge32: 1 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.983554 = Gauge32: 5 percent
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.983570 = Gauge32: 4 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.2 = Gauge32: 2 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.18 = Gauge32: 2 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.514 = Gauge32: 6 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.4162 = Gauge32: 1 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.4163 = Gauge32: 1 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.4610 = Gauge32: 2 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.4626 = Gauge32: 1 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.983554 = Gauge32: 5 percent
CISCO-PROCESS-MIB::cpmCPUTotal5minRev.983570 = Gauge32: 4 percent
--------------------------------------------------------------------------------

上記 OID の index は cpmCPUTotalIndex であり各 CPU に割り当てられた任意の値となっています。
cpmCPUTotalIndex と各 CPU のマッピングは ENTITY-MIB の entPhysicalName から取得できます。

--------------------------------------------------------------------------------

# snmpwalk -v 2c -c private <A.B.C.D> entPhysicalName| egrep "(2359704|10154515|7858209|134949328|185280579|156036026|198577469|1508476423|1520228812)"

ENTITY-MIB::entPhysicalName.2359704 = STRING: 0/0/* - cpu
ENTITY-MIB::entPhysicalName.7858209 = STRING: 0/RP0/* - cpu
ENTITY-MIB::entPhysicalName.10154515 = STRING: 0/1/* - cpu
ENTITY-MIB::entPhysicalName.134949328 = STRING: 1/4/* - cpu0
ENTITY-MIB::entPhysicalName.156036026 = STRING: 1/RP0/* - cpu
ENTITY-MIB::entPhysicalName.185280579 = STRING: 1/4/* - cpu1
ENTITY-MIB::entPhysicalName.198577469 = STRING: 1/RP1/* - cpu
ENTITY-MIB::entPhysicalName.1508476423 = STRING: F0/SC0/* - cpu
ENTITY-MIB::entPhysicalName.1520228812 = STRING: F0/SC1/* - cpu
--------------------------------------------------------------------------------

上記結果をまとめた各 CPU の使用率一覧は以下となります。

cpmCpuTotalIndex
cpmCPUTotalPhysicalIndex
entPhysicalName
cpmCPUTotal1minRev
cpmCPUTotal5minRev
2
2359704
0/0/* - cpu
2 (%)
2 (%)
18
10154515
0/1/* - cpu
22
514
7858209
0/RP0/* - cpu
66
4162
134949328
1/4/* - cpu0
11
4163
185280579
1/RP0/* - cpu
11
4610
156036026
1/4/* - cpu1
22

4626

198577469
1/RP1/* - cpu
11

983554

1508476423
F0/SC0/* - cpu
55

983570

1520228812
F0/SC1/* - cpu
44
バージョン履歴
改訂番号
1/1
最終更新:
‎05-22-2013 10:21 AM
更新者:
 
ラベル(1)