[phosphor-virtual-sensor] Add new feature to get Warning or Critical property
Harvey Wu (吳崇維)
Harvey.Wu at quantatw.com
Wed Dec 30 17:13:21 AEDT 2020
Because I want to calculate the different value between CriticalHigh and current sensor value in CPU sensor, and then there are weighting and some const value to multiply or plus the different value.
But the CPU sensor critical high threshold temp is set as TjMax, and the TjMax value will be different according the different CPU process type, not a Const. That's why I want to add this feature.
For example, according the Document below, if the processor is i7-3770K, the TjMax is 105, and if the processor is U7500, the TjMax is 100.
If the Expression is "(TjMax - currentTemp) * scalar - Const", then it will calculate different results between these two CPU processor.
From: Vijay Khemka <vijaykhemkalinux at gmail.com>
Sent: Wednesday, December 30, 2020 1:02 PM
To: Harvey Wu (吳崇維) <Harvey.Wu at quantatw.com>
Cc: Lei Yu <yulei.sh at bytedance.com>; openbmc at lists.ozlabs.org
Subject: Re: [phosphor-virtual-sensor] Add new feature to get Warning or Critical property
I am not understanding why you want to use threshold values to calculate new sensor values. We can certainly add this feature but it can not be based on name rather we have to think differently to get. It would really help to decide on design once we know it's actual usage. I can't think of any situation here.
On Tue, Dec 29, 2020 at 6:49 PM Harvey Wu (吳崇維) <mailto:Harvey.Wu at quantatw.com> wrote:
> On Wed, Dec 30, 2020 at 10:19 AM Harvey Wu (吳崇維)
> <mailto:Harvey.Wu at quantatw.com> wrote:
> > Hi All,
> > The current phosphor-virtual-sensor DbusParam value is from
> DBus “Value” property which interface is
> > Because I want to get the property “CriticalHigh” value on DBus, could I
> add a new feature “Interface” property in json file? The property can be
> “CriticalHigh” , “CriticalLow” , “WarningHigh” or “WarningLow”.
> According to
> the threshold properties are already supported.
The "Threshold" in json seems only can set the sensor critical or warning value, but I want to use the critical or warning value in "Expression".
After check the newest commit, this function seems doesn't implement in current source code.
> Lei YU
More information about the openbmc