Skip to contentSkip to conversation

Is it required that regulator sensors implement threshold interfaces?

DISCUSSION Shawn McCarney 2 participants 5 messages Sep 26, 2019 – Sep 27, 2019

lore
Share & tools
lore
#0 lore raw

Hi,

I am working on an application that will configure voltage regulators (VRMs) and read their sensors.

I'll be putting about 9 sensors per VRM on D-Bus that will implement the Sensor.Value interface.  However, I'd rather not implement the warning and critical Threshold interfaces for those sensors.

Is there any reason that would cause a problem?

Also, the Sensor.Value interface has MinValue and MaxValue properties.  Are these required to have valid (non-zero) values? What breaks if they are just set to 0?  I'd rather not provide these values as well.

Thanks for any help!

Shawn

#1 lore raw
Quoted 10 lines · Shawn McCarney

Hi,

I am working on an application that will configure voltage regulators (VRMs) and read their sensors.

I'll be putting about 9 sensors per VRM on D-Bus that will implement the Sensor.Value interface.  However, I'd rather not implement the warning and critical Threshold interfaces for those sensors.

Is there any reason that would cause a problem?

Nope. There are plenty of sensors that don't implement warning or critical interfaces, although I would recommend you do for logging purposes, even if they are artificially high, but that's up to what you're wanting to implement.

Quoted 5 lines

Also, the Sensor.Value interface has MinValue and MaxValue properties. Are these required to have valid (non-zero) values? What breaks if they are just set to 0?  I'd rather not provide these values as well.

For some implementations, these are used to appropriately scale the SDR, and provide the redfish interfaces for those properties. pid-control also uses it to scale readings to 0-100% for ease in defining clamp values. I'm not really following why you wouldn't want to implement those. They don't have to be exact, and there are plenty of cases where they are set to INT8_MAX and INT8_MIN. Usually you will know based on the spec you're implementing if the values fall into a uint8/int8/int16/uint16 range, and you can just put in the specified range limits.

#2 lore raw

Hi Ed.  Thanks for the information and feedback.

Quoted 2 lines · Ed Tanous

For some implementations, these are used to appropriately scale the SDR, and provide the redfish interfaces for those properties.

What is SDR?  Sorry I'm not familiar with that acronym.

Quoted 2 lines

I'm not really following why you wouldn't want to implement those.

The problem is one of scale.  Some of the systems where my application will run may have 30+ voltage rails.  30 rails * 9 sensors per rail = 270 MinValues and MaxValues.  I'd rather not ask the hardware engineers to provide 540 data values unless absolutely necessary.

Quoted 5 lines

They don't have to be exact, and there are plenty of cases where
they are set to INT8_MAX and INT8_MIN. Usually you will know based on the spec you're implementing if the values fall into a uint8/int8/int16/uint16 range, and you can just put in the specified range limits.

That's probably a better approach that setting both min and max to 0.  I was just wondering if anything (especially IPMI) would break if I set all the sensor min/max values to INT16_MIN/INT16_MAX.

Thanks!

Shawn

#3 lore raw
Quoted 7 lines · Shawn McCarney

Hi Ed.  Thanks for the information and feedback.

Quoted 2 lines · Ed Tanous

For some implementations, these are used to appropriately scale the SDR, and provide the redfish interfaces for those properties.

What is SDR?  Sorry I'm not familiar with that acronym.

Section 33 of the IPMI specification. Type 1 record, M and B values are what you're looking for.

Quoted 8 lines
Quoted 3 lines

I'm not really following why you wouldn't want to implement those.

The problem is one of scale.  Some of the systems where my application will run may have 30+ voltage rails.  30 rails * 9 sensors per rail = 270 MinValues and MaxValues.  I'd rather not ask the hardware engineers to provide 540 data values unless absolutely necessary.

You'll already need to ask the hardware engineers for the voltage scaling for all of these rails, so you already have a scale problem. The nice thing about voltage is that in most cases, the minimum is 0 volts, and the max is resistor bridge scaling factor X voltage range of the ADC (in the Aspeed case, 3.3V). You could pretty easily just do it that way and have no real issues.

Alternatively, ADCsensor in dbus-sensors does the above math for you at runtime to build those values, but I'm not sure if IBM platforms are on that yet.

Quoted 10 lines
Quoted 6 lines

   They don't have to be exact, and there are plenty of cases where they are set to INT8_MAX and INT8_MIN.  Usually you will know based on the spec you're implementing if the values fall into a uint8/int8/int16/uint16 range, and you can just put in the specified range limits.

That's probably a better approach that setting both min and max to 0.  I was just wondering if anything (especially IPMI) would break if I set all the sensor min/max values to INT16_MIN/INT16_MAX.

Nothing should break. That's perfectly legal, but some users might have resolution issues, because INT16MAX is going to pick a really high M value, which is going to reduce your IPMI 8 bit resolution.

#4 lore raw

Thanks Ed great feedback.  I appreciate you taking the time.

Shawn