2013-05-31 03:49 PM
SNMPにてノードの温度センサーをモニタリングする場合、CISCO-ENTITY-SENSOR-MIB の以下の OID にて温度情報を取得することができます。
上記 OID の意味はそれぞれ以下のようになっています。
OID | Description | Value |
---|---|---|
entSensorType | センサーのタイプ | voltsAC(3),voltsDC(4),amperes(5),watts(6),celsius(8),rpm(10), etc. |
entSensorScale | センサーのスケール | micro(7),milli(8),units(9),kilo(10),mega(11), etc. |
entSensorPrecision | センサーの精度 | (-8..9) |
entSensorValue | センサーの値 |
|
entSensorStatus | センサーの状態 | ok(1),unavailable(2),nonoperational(3) |
------------------------------------------------------------
entSensorType OBJECT-TYPE
SYNTAX SensorDataType
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This variable indicates the type of data
reported by the entSensorValue.
This variable is set by the agent at start-up
and the value does not change during operation."
::= { entSensorValueEntry 1 }
entSensorScale OBJECT-TYPE
SYNTAX SensorDataScale
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This variable indicates the exponent to apply
to sensor values reported by entSensorValue.
This variable is set by the agent at start-up
and the value does not change during operation."
::= { entSensorValueEntry 2 }
entSensorPrecision OBJECT-TYPE
SYNTAX SensorPrecision
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This variable indicates the number of decimal
places of precision in fixed-point
sensor values reported by entSensorValue.
This variable is set to 0 when entSensorType
is not a fixed-point type: voltsAC(1), voltsDC(2),
amperes(3), watts(4), hertz(5), celsius(6), or cmm(9).
This variable is set by the agent at start-up
and the value does not change during operation."
::= { entSensorValueEntry 3 }
entSensorValue OBJECT-TYPE
SYNTAX SensorValue
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This variable reports the most recent measurement seen
by the sensor.
To correctly display or interpret this variable's value,
you must also know entSensorType, entSensorScale, and
entSensorPrecision.
However, you can compare entSensorValue with the threshold
values given in entSensorThresholdTable without any semantic
knowledge.
"
::= { entSensorValueEntry 4 }
entSensorStatus OBJECT-TYPE
SYNTAX SensorStatus
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This variable indicates the present operational status
of the sensor."
::= { entSensorValueEntry 5 }
------------------------------------------------------------
以下、ASR9K にて Net-SNMP を使って各 CPU の温度センサー値を取得するサンプルになります。
1) 温度センサーの一覧を取得
entSensorType が celcius(8) であるセンサーの一覧を取得する。
------------------------------------------------------------
# snmpwalk -v 2c -c public <A.B.C.D> entSensorType | grep celsius
CISCO-ENTITY-SENSOR-MIB::entSensorType.2031334 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.5854428 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.7194350 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.14004310 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.14767495 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.16226363 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.18960943 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.25488015 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.28783653 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.31222139 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.34095411 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.35959791 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.42265628 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.45561266 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.45701958 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.47748509 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.51313331 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.52362521 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.52737404 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.58754277 = INTEGER: celsius(8)
CISCO-ENTITY-SENSOR-MIB::entSensorType.62919878 = INTEGER: celsius(8)
------------------------------------------------------------
2) 温度センサーの状態を確認
entSensorStatus が ok(1) である温度センサーの一覧を取得する。
------------------------------------------------------------
# snmpwalk -v 2c -c public <A.B.C.D> entSensorStatus | egrep "(2031334|5854428|7194350|14004310|14767495|16226363|18960943|25488015|28783653|31222139|34095411|35959791|42265628|45561266|45701958|47748509|51313331|52362521|52737404|58754277|62919878)"
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.2031334 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.5854428 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.7194350 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.14004310 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.14767495 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.16226363 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.18960943 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.25488015 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.28783653 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.31222139 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.34095411 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.35959791 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.42265628 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.45561266 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.45701958 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.47748509 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.51313331 = INTEGER: unavailable(2)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.52362521 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.52737404 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.58754277 = INTEGER: ok(1)
CISCO-ENTITY-SENSOR-MIB::entSensorStatus.62919878 = INTEGER: unavailable(2)
------------------------------------------------------------
3) 温度センサーの種別を確認
Transceiver の温度センサー以外の温度センサーの一覧を取得する。
------------------------------------------------------------
# snmpwalk -v 2c -c public <A.B.C.D> entPhysicalDescr | egrep "(2031334|5854428|7194350|14004310|14767495|16226363|18960943|25488015|28783653|31222139|34095411|35959791|42265628|45561266|45701958|47748509|52362521|52737404|58754277)" | grep -v Transceiver
ENTITY-MIB::entPhysicalDescr.2031334 = STRING: Hot Temperature SensorHotspot0
ENTITY-MIB::entPhysicalDescr.25488015 = STRING: Hot Temperature SensorHotspot0
ENTITY-MIB::entPhysicalDescr.28783653 = STRING: Hot Temperature SensorHotspot0
ENTITY-MIB::entPhysicalDescr.35959791 = STRING: Inlet Temperature SensorInlet0
ENTITY-MIB::entPhysicalDescr.42265628 = STRING: Inlet Temperature SensorInlet0
ENTITY-MIB::entPhysicalDescr.45561266 = STRING: Inlet Temperature SensorInlet0
ENTITY-MIB::entPhysicalDescr.52362521 = STRING: Inlet Temperature SensorInlet0
ENTITY-MIB::entPhysicalDescr.52737404 = STRING: Hot Temperature SensorHotspot0
------------------------------------------------------------
4) 温度センサーの Location (RSP/LC) 確認
各温度センサーがどの Location のセンサーであるかを確認する。
------------------------------------------------------------
# snmpwalk -v 2c -c public <A.B.C.D> entPhysicalName | egrep "(2031334|25488015|28783653|35959791|42265628|45561266|52362521|52737404)"
ENTITY-MIB::entPhysicalName.2031334 = STRING: temperature 0/0/CPU0
ENTITY-MIB::entPhysicalName.25488015 = STRING: temperature 0/6/CPU0
ENTITY-MIB::entPhysicalName.28783653 = STRING: temperature 0/RSP0/CPU0
ENTITY-MIB::entPhysicalName.35959791 = STRING: temperature 0/RSP1/CPU0
ENTITY-MIB::entPhysicalName.42265628 = STRING: temperature 0/6/CPU0
ENTITY-MIB::entPhysicalName.45561266 = STRING: temperature 0/RSP0/CPU0
ENTITY-MIB::entPhysicalName.52362521 = STRING: temperature 0/0/CPU0
ENTITY-MIB::entPhysicalName.52737404 = STRING: temperature 0/RSP1/CPU0
------------------------------------------------------------
5) 温度センサーの値確認
------------------------------------------------------------
# snmpwalk -v 2c -c public <A.B.C.D> entSensorValue | egrep "(2031334|25488015|28783653|35959791|42265628|45561266|52362521|52737404)"
CISCO-ENTITY-SENSOR-MIB::entSensorValue.2031334 = INTEGER: 391
CISCO-ENTITY-SENSOR-MIB::entSensorValue.25488015 = INTEGER: 391
CISCO-ENTITY-SENSOR-MIB::entSensorValue.28783653 = INTEGER: 384
CISCO-ENTITY-SENSOR-MIB::entSensorValue.35959791 = INTEGER: 251
CISCO-ENTITY-SENSOR-MIB::entSensorValue.42265628 = INTEGER: 311
CISCO-ENTITY-SENSOR-MIB::entSensorValue.45561266 = INTEGER: 251
CISCO-ENTITY-SENSOR-MIB::entSensorValue.52362521 = INTEGER: 316
CISCO-ENTITY-SENSOR-MIB::entSensorValue.52737404 = INTEGER: 369
------------------------------------------------------------
6) 温度センサーのスケール確認
------------------------------------------------------------
# snmpwalk -v 2c -c public <A.B.C.D> entSensorScale | egrep "(2031334|25488015|28783653|35959791|42265628|45561266|52362521|52737404)"
CISCO-ENTITY-SENSOR-MIB::entSensorScale.2031334 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.25488015 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.28783653 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.35959791 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.42265628 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.45561266 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.52362521 = INTEGER: units(9)
CISCO-ENTITY-SENSOR-MIB::entSensorScale.52737404 = INTEGER: units(9)
------------------------------------------------------------
7) 温度センサー値の精度確認
------------------------------------------------------------
# snmpwalk -v 2c -c public <A.B.C.D> entSensorPrecision | egrep "(2031334|25488015|28783653|35959791|42265628|45561266|52362521|52737404)"
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.2031334 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.25488015 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.28783653 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.35959791 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.42265628 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.45561266 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.52362521 = INTEGER: 1
CISCO-ENTITY-SENSOR-MIB::entSensorPrecision.52737404 = INTEGER: 1
------------------------------------------------------------
上記 OID にて取得した値より、各ノード (RSP/LC) の各センサーの温度は以下のようになります。
entPhysicalIndex | entPhysicalDescr | entPhysicalName | entSensorValue | entSensorScale | entSensorPrecision | 温度(℃) |
---|---|---|---|---|---|---|
2031334 | Hot Temperature SensorHotspot0 | temperature 0/0/CPU0 | 391 | units(9) | 1 | 39.1 |
25488015 | Hot Temperature SensorHotspot0 | temperature 0/6/CPU0 | 391 | units(9) | 1 | 39.1 |
28783653 | Hot Temperature SensorHotspot0 | temperature 0/RSP0/CPU0 | 384 | units(9) | 1 | 38.4 |
35959791 | Inlet Temperature SensorInlet0 | temperature 0/RSP1/CPU0 | 251 | units(9) | 1 | 25.1 |
42265628 | Inlet Temperature SensorInlet0 | temperature 0/6/CPU0 | 311 | units(9) | 1 | 31.1 |
45561266 | Inlet Temperature SensorInlet0 | temperature 0/RSP0/CPU0 | 251 | units(9) | 1 | 25.1 |
52362521 | Inlet Temperature SensorInlet0 | temperature 0/0/CPU0 | 316 | units(9) | 1 | 31.6 |
52737404 | Hot Temperature SensorHotspot0 | temperature 0/RSP1/CPU0 | 369 | units(9) | 1 | 36.9 |
なお、 SNMP にて取得した温度センサー値は以下の show コマンドの出力に対応しています。
------------------------------------------------------------
RP/0/RSP1/CPU0:ASR9010a#show platform
Node Type State Config State
-----------------------------------------------------------------------------
0/RSP0/CPU0 A9K-RSP-8G(Standby) IOS XR RUN PWR,NSHUT,MON
0/RSP1/CPU0 A9K-RSP-8G(Active) IOS XR RUN PWR,NSHUT,MON
0/0/CPU0 A9K-2T20GE-L IOS XR RUN PWR,NSHUT,MON
0/6/CPU0 A9K-40GE-L IOS XR RUN PWR,NSHUT,MON
RP/0/RSP1/CPU0:ASR9010a#
RP/0/RSP1/CPU0:ASR9010a#show environment temperatures location all
R/S/I Modules Sensor (deg C)
0/0/*
host Inlet0 31.6
host Hotspot0 39.1
0/RSP0/*
host Inlet0 25.1
host Hotspot0 38.4
0/RSP1/*
host Inlet0 25.1
host Hotspot0 36.9
0/6/*
host Inlet0 31.1
host Hotspot0 39.1
RP/0/RSP1/CPU0:ASR9010a#
------------------------------------------------------------
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします