Detaillierte Analyse eines IPMI Sensors

Aus Thomas-Krenn-Wiki
Zur Navigation springen Zur Suche springen

Im folgenden Beispiel zeigen wir die Analyse von IPMI Sensoren. Wir vergleichen dabei zwei Lüfter-Sensoren eines SR2500 Servers:

  • Fan 1 (diesen Hot-Plug Lüfter haben für diesen Test entfernt)
  • Fan 2 (dieser Lüfter läuft normal)

Get Sensor Reading Analyse mit ipmitool

In der Tabelle zeigen wir die Analyse mit ipmitool. Wir verwenden dabei sowohl ipmitool sdr get als auch ipmitool sdr raw.

Fan 1 Fan 2
# ipmitool sdr get "Fan 1"
Sensor ID              : Fan 1 (0x50)
 Entity ID             : 29.1 (Fan Device)
 Sensor Type (Analog)  : Fan
 Sensor Reading        : No Reading
 Status                : Disabled
 Nominal Reading       : 6708.000
 Normal Minimum        : 2451.000
 Normal Maximum        : 10965.000
 Lower critical        : 1720.000
 Lower non-critical    : 1978.000
 Positive Hysteresis   : 86.000
 Negative Hysteresis   : 86.000
 Minimum sensor range  : Unspecified
 Maximum sensor range  : Unspecified
 Event Message Control : Per-threshold
 Readable Thresholds   : lcr lnc 
 Settable Thresholds   : lcr lnc 
 Threshold Read Mask   : lcr lnc 
 Event Status          : Unavailable
 Assertions Enabled    : lnc- lcr- 
 Deassertions Enabled  : lnc- lcr- 
# ipmitool sdr get "Fan 2"
Sensor ID              : Fan 2 (0x51)
 Entity ID             : 29.2 (Fan Device)
 Sensor Type (Analog)  : Fan
 Sensor Reading        : 8600 (+/- 0) RPM
 Status                : ok
 Nominal Reading       : 6708.000
 Normal Minimum        : 2451.000
 Normal Maximum        : 10965.000
 Lower critical        : 1720.000
 Lower non-critical    : 1978.000
 Positive Hysteresis   : 86.000
 Negative Hysteresis   : 86.000
 Minimum sensor range  : Unspecified
 Maximum sensor range  : Unspecified
 Event Message Control : Per-threshold
 Readable Thresholds   : lcr lnc 
 Settable Thresholds   : lcr lnc 
 Threshold Read Mask   : lcr lnc 
 Assertion Events      : 
 Assertions Enabled    : lnc- lcr- 
 Deassertions Enabled  : lnc- lcr- 
# ipmitool -v raw 0x04 0x2d 0x50
Data length = 1
RAW REQ (channel=0x0 netfn=0x4 lun=0x0 cmd=0x2d data_len=1)
RAW REQUEST (1 bytes)
 50
RAW RSP (3 bytes)
 00 e0 00
# ipmitool -v raw 0x04 0x2d 0x51
Data length = 1
RAW REQ (channel=0x0 netfn=0x4 lun=0x0 cmd=0x2d data_len=1)
RAW REQUEST (1 bytes)
 51
RAW RSP (3 bytes)
 8c c0 00

Aufbau des raw Kommandos

Beim raw Kommando führen wir das Get Sensor Reading Command aus. Details zu diesem Kommando finden Sie im Kapitel 35.14 Get Sensor Reading Command und Appendix G - Command Assignments der IPMI Spezifikation (siehe IPMI Grundlagen -> Einzelnachweise).

Laut dem Appendix G der IPMI Spezifikation gilt für das Get Sensor Reading Kommando:

  • NetFn = S/E (bedeutet Network Function Code = Sensor/Event)
  • CMD = 2Dh

Die Network Function Codes sind in der IPMI Spezifikation in Kapitel 5.1 Network Function Codes definiert. Sensor/Event hat hier den Wert 4. ipmitool gibt diese Zuordnungen auch aus:

$ ipmitool raw
RAW Commands:  raw <netfn> <cmd> [data]

Network Function Codes:

  VAL	HEX	STRING
==============================================
  0	0x00	Chassis
  2	0x02	Bridge
  4	0x04	SensorEvent
  6	0x06	Application
  8	0x08	Firmware
  10	0x0a	Storage
  12	0x0c	Transport

(can also use raw hex values)

Das Get Sensor Reading Command erwartet schließlich als Parameter die Sensor Number (ipmitool gibt diese als Sensor ID aus). Somit lautet das vollständige Kommando für Fan 1 ipmitool -v raw 0x04 0x2d 0x50.

Einen ausführlichen Debugging Ausgabe beim Aufrufen über den LAN Channel mittels ipmitool -I lan -H 192.168.1.211 -U admin -vvvv raw 0x04 0x2d 0x50 finden Sie in der Datei:IPMItool-raw-debugging-output-via-LAN-channel.txt.

Analyse der raw Response

Die raw Response zeigte folgende Ausgaben:

  • Fan 1: 00 e0 00 (im Binärformat: 00000000 11100000 00000000)
  • Fan 2: 8c c0 00 (im Binärformat: 10001100 11000000 00000000)

Diese Bytes haben laut IPMI Spezifikation Table 35-15, Get Sensor Reading Command folgende Bedeutung:

  • Byte 1: Completion Code (wird in der Ausgabe von ipmitool nicht angezeigt)
  • Byte 2: Sensor reading
  • Byte 3:
    • Bit 7: 0b = All Event Messages disabled from this sensor
    • Bit 6: 0b = sensor scanning disabled
    • Bit 5: 1b = reading/state unavailable
      Das ist in diesem Fall das interessante Bit, da es beim Fan 1 gesetzt ist. Da wir den Fan 1 in diesem Beispiel entfernt haben, kann dessen Status nicht gelesen werden. Hier ein Auszug dazu aus der Spezifikation:
      The bit is also used to indicate when a reading/state is unavailable because the management controller cannot obtain a valid reading or state for the monitored entity, typically because the entity is not present. See Section 16.4, Event Status, Event Conditions, and Present State and Section 16.6, Re-arming for more information.
      Hierzu noch der Auszug aus 16.4 Event Status, Event Conditions, and Present State:
      A reading/state unavailable (formerly “initial update in progress”) bit is provided with the Get Sensor Reading and Get Sensor Event Status commands to indicate to software that it must ignore the reading and/or state information because the BMC cannot obtain a valid reading and/or state information. This can occur in situations where the sensor is monitoring an entity that may or may not be present, such as with hot-swap devices. For example, if a sensor monitors the temperature of a hot-swap power supply, the reading/state unavailable bit can be used to indicate that no valid temperature reading is available because the power supply is not installed. The bit can also indicate when a reading or state is unavailable because a sensor is re-arming (see Section 16.6, Rearming, below.
    • Bits 4-0: reserved. Ignore on read.
  • Byte 4: comparison status (for threshold-based sensors) / assertion status (for discrete reading sensors)

Full Sensor Record - SDR Type 01h Analyse mit openipmish

Bei der Analyse des SDR Records verwenden wir hier openimpish, um auch eine Analyse mit diesem Tool zu zeigen. Wir betrachten hier nur den Fan 2:

  SDR
    Record ID: 14
    Type: 1
    Version: 1.5
    Data: 0x20 0x00 0x51 0x1d 0x02 0x7f 0x28 0x04
          0x01 0x05 0x30 0x05 0x00 0x03 0x03 0x00
          0x12 0x00 0x00 0x2b 0x00 0x00 0x00 0x00
          0x00 0x07 0x9c 0xff 0x39 0xff 0x00 0x00
          0x00 0x00 0x00 0x28 0x2e 0x02 0x02 0x00
          0x00 0x00 0xc5 0x46 0x61 0x6e 0x20 0x32

Hinweis: Die Bedeutung der einzelnen Felder finden Sie in Table 43-1, Full Sensor Record - SDR Type 01h der IPMI Spezifikation (siehe IPMI Grundlagen -> Einzelnachweise).

Zeile 1

    Data: 0x20 0x00 0x51 0x1d 0x02 0x7f 0x28 0x04
  • 0x20 (Byte 6): Sensor Owner ID
  • 0x00 (Byte 7): Sensor Owner LUN
  • 0x51 (Byte 8): Sensor Number, stimmt mit Sensor ID von ipmitool überein
  • 0x1d (Byte 9): Entity ID (0x1d entspricht dezimal 29)
  • 0x02 (Byte 10): Entity Instance
  • 0x7f (Byte 11): Sensor Initialization
  • 0x28 (Byte 12): Sensor Capabilities
  • 0x04 (Byte 13): Sensor Type (0x04 entspricht 'Fan', siehe Table 42-3, Sensor Type Codes der IPMI Spezifikation)

Zeile 2

          0x01 0x05 0x30 0x05 0x00 0x03 0x03 0x00
  • 0x01 (Byte 14): Event / Reading Type Code
  • 0x05 (Byte 15): Assertion Event Mask
  • 0x30 (Byte 16): Lower Threshold Reading Mask
  • 0x05 (Byte 17): Deassertion Event Mask
  • 0x00 (Byte 18): Upper Threshold Reading Mask
  • 0x03 (Byte 19): Discrete Reading Mask
  • 0x03 (Byte 20): Settable Threshold Mask, Readable Threshold Mask
  • 0x00 (Byte 21): Sensor Units 1

Zeile 3

          0x12 0x00 0x00 0x2b 0x00 0x00 0x00 0x00
  • 0x12 (Byte 22): Sensor Units 2 - Base Unit
  • 0x00 (Byte 23): Sensor Units 3 - Modifier Unit
  • 0x00 (Byte 24): Linearization
  • 0x2b (Byte 25): M
  • 0x00 (Byte 26): M, Tolerance
  • 0x00 (Byte 27): B
  • 0x00 (Byte 28): B, Accuracy
  • 0x00 (Byte 29): Accuracy, Accuracy exp, Sensor Direction

Zeile 4

          0x00 0x07 0x9c 0xff 0x39 0xff 0x00 0x00
  • 0x00 (Byte 30): R exp, B exp
  • 0x07 (Byte 31): Analog characteristic flags
  • 0x9c (Byte 32): Nominal Reading
  • 0xff (Byte 33): Normal Maximum
  • 0x39 (Byte 34): Normal Minimum
  • 0xff (Byte 35): Sensor Maximum Reading
  • 0x00 (Byte 36): Sensor Minimum Reading
  • 0x00 (Byte 37): Upper non-recoverable Threshold

Zeile 5

          0x00 0x00 0x00 0x28 0x2e 0x02 0x02 0x00
  • 0x00 (Byte 38): Upper critical Threshold
  • 0x00 (Byte 39): Upper non-critical Threshold
  • 0x00 (Byte 40): Lower non-recoverable Threshold
  • 0x28 (Byte 41): Lower critical Threshold
  • 0x2e (Byte 42): Lower non-critical Threshold
  • 0x02 (Byte 43): Positive-going Threshold Hysteresis value
  • 0x02 (Byte 44): Negative-going Threshold Hysteresis value
  • 0x00 (Byte 45): reserved

Zeile 6

          0x00 0x00 0xc5 0x46 0x61 0x6e 0x20 0x32
  • 0x00 (Byte 46): reserved
  • 0x00 (Byte 47): OEM
  • 0xc5 (Byte 48): ID String Type/Length Code
  • 0x46 0x61 0x6e 0x20 0x32 (Bytes 49 + N): ID String Bytes


Foto Werner Fischer.jpg

Autor: Werner Fischer

Werner Fischer arbeitet im Product Management Team von Thomas-Krenn. Er evaluiert dabei neueste Technologien und teilt sein Wissen in Fachartikeln, bei Konferenzen und im Thomas-Krenn Wiki. Bereits 2005 - ein Jahr nach seinem Abschluss des Studiums zu Computer- und Mediensicherheit an der FH Hagenberg - heuerte er beim bayerischen Server-Hersteller an. Als Öffi-Fan nutzt er gerne Bus & Bahn und genießt seinen morgendlichen Spaziergang ins Büro.


Das könnte Sie auch interessieren

FreeIPMI meldet ipmi ctx open outofband: BMC busy beim Versuch IPMI Sensoren abzufragen
IPMI Virtual Media ISO einbinden X12/H12-Generation
Supermicro IPMI Product IDs