"An application that wishes to retrieve the full set of SDR Records must first issue the Get SDR starting with 0000h as the Record ID to get the first record. The Next Record ID is extracted from the response and this is then used as the Record ID in a Get SDR request to get the next record. This is repeated until the 'Last Record ID' value (FFFFh) is returned in the 'Next Record ID' field of the response."
For example:
Step 1. Get the First SDR record
The details of Get SDR command
ipmitool raw 0x0a 0x23 Data[1:6]
Response Data[1:N]
where,
Request Data[1]: Reservation ID. LS Byte.
Request Data[2]: Reservation ID. MS Byte.
Request Data[3]: Record ID. LS Byte.
Request Data[4]: Record ID. MS Byte.
Request Data[5]: Offest into record.
Request Data[6]: Byte to read. FFh: Entire Record
Response Data[2]: Record ID for next record, LS Byte
Response Data[3]: Record ID for next record, MS Byte
Response Data[4:N]: Record Data
Record ID = 0x0000h is the First record
Record ID = 0xffffh is the Last record
Get the First SDR record
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x00 0x00 0x00 0xff
02 00 01 00 51 01 33 20 00 01 07 01 7f 68 02 01
95 7a 95 7a 3f 3f 00 04 00 00 04 00 00 00 00 e0
00 52 58 4b ff 00 63 5e 59 42 46 4a 00 00 00 00
00 c8 2b 56 33 5f 33 41 55 58
where,02 00 01 00 51 01 33 20 00 01 07 01 7f 68 02 01
95 7a 95 7a 3f 3f 00 04 00 00 04 00 00 00 00 e0
00 52 58 4b ff 00 63 5e 59 42 46 4a 00 00 00 00
00 c8 2b 56 33 5f 33 41 55 58
Response Data[3:2]= 0x0002 = Record ID for the Next record
Response Data[5:4]= 0x0001 = Record ID for the First record
Step 2. Repeated to get the Next record
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x02 0x00 0x00 0xff
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x03 0x00 0x00 0xff
...
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x03 0x00 0x00 0xff
...
Step 3. Until the Last record ID value (0xffff) is returned
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x1f 0x00 0x00 0xff
20 00 1f 00 51 01 39 20 00 25 03 00 7f 68 01 01
00 70 00 70 3f 3f 00 01 00 00 01 02 00 02 30 00
07 38 4a 06 ff 00 67 5f 5a 00 02 05 00 00 00 00
00 ce 58 65 6f 6e 5f 50 68 69 31 5f 54 65 6d 70
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x20 0x00 0x00 0xff
ff ff 20 00 51 01 39 20 00 26 03 00 7f 68 01 01
00 70 00 70 3f 3f 00 01 00 00 01 02 00 02 30 00
07 38 4a 06 ff 00 67 5f 5a 00 02 05 00 00 00 00
00 ce 58 65 6f 6e 5f 50 68 69 32 5f 54 65 6d 70
where,20 00 1f 00 51 01 39 20 00 25 03 00 7f 68 01 01
00 70 00 70 3f 3f 00 01 00 00 01 02 00 02 30 00
07 38 4a 06 ff 00 67 5f 5a 00 02 05 00 00 00 00
00 ce 58 65 6f 6e 5f 50 68 69 31 5f 54 65 6d 70
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x20 0x00 0x00 0xff
ff ff 20 00 51 01 39 20 00 26 03 00 7f 68 01 01
00 70 00 70 3f 3f 00 01 00 00 01 02 00 02 30 00
07 38 4a 06 ff 00 67 5f 5a 00 02 05 00 00 00 00
00 ce 58 65 6f 6e 5f 50 68 69 32 5f 54 65 6d 70
Response Data[3:2]= 0xffff = Last record ID value
Response Data[5:4] = 0x0020 = Record ID for the Last record
Therefore, the Record ID is from 0x01 to 0x20.
============================================
To analyze the Record Data for the Sensor data information
For example:
Get SDR Record where ID = 0x0001
$ ipmitool raw 0x0a 0x23 0x00 0x00 0x01 0x00 0x00 0xff
02 00 01 00 51 01 33 20 00 01 07 01 7f 68 02 01
95 7a 95 7a 3f 3f 00 04 00 00 04 00 00 00 00 e0
00 52 58 4b ff 00 63 5e 59 42 46 4a 00 00 00 00
00 c8 2b 56 33 5f 33 41 55 58
02 00 01 00 51 01 33 20 00 01 07 01 7f 68 02 01
95 7a 95 7a 3f 3f 00 04 00 00 04 00 00 00 00 e0
00 52 58 4b ff 00 63 5e 59 42 46 4a 00 00 00 00
00 c8 2b 56 33 5f 33 41 55 58
Step 1. Retrieve the Record Type
where,
Response Data[6] = 0x51 = SDR Version
Response Data[7] = 0x01 = Record Type (SDR type)
Response Data[8] = 0x33 = Record Length
Refer to the IPMI spec,
SDR type 01h is Full Sensor Record
SDR type 02h is Compact Sensor Record
SDR type 03h is Event-Only Record
SDR type 08h is Entity Association Record
...
SDR type C0h is OEM Record
Step 2. Look up the Description of the Sensor Record
In this example, the SDR type = 0x01 = Full SDR record,
then look up the "Table 43-1, Full Sensor Record - SDR Type 01h" in IPMI spec
where,
Response Data[5:4] = 0x0001 = Record ID = byte[1:2] in Full Sensor Record
Response Data[11] = 0x01 = Sensor number = byte[8] in Full Sensor Record
Response Data[16] = 0x02 = Sesnor type = byte[13] in Full Sensor Record
Response Data[53:N] = Sensor name V3_3AUX in ASCII
00 c8 2b 56 33 5f 33 41 55 58
V 3 _ 3 A U X
Step 3. Look up the Sensor Type
Look up "Table 42-3, Sensor Type Codes" in IPMI spec
Sensor Type Code = 0x00 = reserved type
Sensor Type Code = 0x01 = Temperature type
Sensor Type Code = 0x02 = Voltage type
Sensor Type Code = 0x03 = Current type
Sensor Type Code = 0x04 = Fan type
...
In this example, the Response Data[16] = 0x02 = Sesnor type,
therefore the Response Data[16] = 0x02 = Voltage
The Sensor information from the SDR reading:
Sensor Number = 0x01
Sensor Type = Voltage
Sensor Name = V3_3AUX
Reference
[1] "Intelligent Platform Management Interface Specification Second Generation v2.0"[2] "IPMItool" http://ipmitool.sourceforge.net/
[3] "IPMI Command Test Tool" http://www.intel.com/design/servers/ipmi/ipmi_tool.htm
[3] "IPMI Command Test Tool" http://www.intel.com/design/servers/ipmi/ipmi_tool.htm
No comments:
Post a Comment