Pages

Wednesday, October 16, 2013

IPMI Sensor Reading Conversion Formula

Refer to the IPMI specification chapter 36.3. The formula used for converting 'raw' sensor reading for LINER sensors to real values in the desired 'units' (e.g. Volts, Degree C, Amp, etc).

y = L [ (M * x + (B * 10^K1)) * 10^K2 ] units

For example:

To read the 3.3 V voltage sensor number 0x1

Step 1. Get Sensor Reading
$ ipmitool raw 0x04 0x2d 0x01
 54 c0 c0 00
where,
Response Data[2] = 0x54 = x = Raw Reading

Step 2. Get sensor reading factor
$ ipmitool raw 0x04 0x23 0x01 0x10
 04 04 00 00 00 00 e0
where,
Response Data[3] = 0x04 = M (LS 8 bits)
Response Data[4], bit[7:6] = 0x0 = M (MS 2 bits)
M = 0x004 = Signed integer constant Multiplier
Response Data[5] = 0x00 = B (LS 8 bits)
Response Data[6], bit[7:6] = 0x0 = M (MS 2 bits)
= 0x000 = Offset
Response Data[8], bit[7:4] = 0xe = K2 = Signed R exponent, 2's complement
Response Data[8], bit[3:0] = 0x0 = K1 = Signed B exponent, 2's complement

Step 3. Convert the value to Decimal
x = hex(54) = dec(84)
M = hex(04) = dec(04)
B = hex(00) = dec(0)
K2 = 2's complement(e) = dec(-2)
K1 = 2's complement(0) = dec(0)

The real value,

y = (84 * 4 + (0 * 10 ^ (0))) * 10^(-2) = 3.36 V


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

No comments:

Post a Comment