#
f2e94221 |
| 31-Oct-2023 |
Tao Lin <lintao.lc@ieisystem.com> |
UpdateVirtualSensor uses information from signals
UpdateVirtualSensor uses information obtained from signals to avoid extensive dbus queries.
Tested: 1:Execute DBus cmd to see if VirtualSensor can
UpdateVirtualSensor uses information from signals
UpdateVirtualSensor uses information obtained from signals to avoid extensive dbus queries.
Tested: 1:Execute DBus cmd to see if VirtualSensor can correctly obtain the value of DbusSensor busctl tree xyz.openbmc_project.VirtualSensor busctl introspect xyz.openbmc_project.VirtualSensor xxx 2:Waiting for the value change of DbusSensor,Check if the value of the virtual sensor has changed after the dbusSensor changes.
Fixes openbmc/phosphor-virtual-sensor#1
Change-Id: If11f9017b31ce5cf06f910a38c65637c55d74b24 Signed-off-by: Tao Lin <lintao.lc@ieisystem.com>
show more ...
|
#
a291ce1a |
| 06-Feb-2023 |
Matt Spinler <spinler@us.ibm.com> |
Fixes around persisting values in entity-manager
This fixes three problems that were causing "Faild to set dbus property." error traces to show up.
1. In VirtualSensor::createThresholds() the setEn
Fixes around persisting values in entity-manager
This fixes three problems that were causing "Faild to set dbus property." error traces to show up.
1. In VirtualSensor::createThresholds() the setEntityPath() and setEntityInterfaceHigh/Low() calls have to be made on the threshold objects before the critical/warning/High/Low() functions are called so that the path and interface is known for the property set call. Reorder the code so this is the case.
2. Saving the value in entity-manager only works when the virtual sensor config was obtained from entity-manager D-Bus objects, and not when it was obtained from virtual_sensor_config.json. In the latter case, the 'entityPath' variable won't have a value, so check for that before trying to set a property on entity-manager.
3. If either a 'high' or 'low' threshold property isn't set, then the 'entityInterfaceHigh/Low' variable will be empty. Also skip the property write in that case.
Tested: No more error traces, and verified that changing a threshold value on a virtual sensor is still reflected in entity-manager when its config was from EM in the first place.
Change-Id: I67dc35fb4b8f4c1367231e22ddde91fbd1bb354d Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
83e3ac39 |
| 26-Nov-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Change-Id: I2d75afd5b8786a82fccb9d2e06e0696005b8e839 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
91799dbd |
| 27-Jul-2022 |
Tao Lin <lintao.lc@inspur.com> |
Update threshold to entity-manager
Save path&interface when creating thresholds,and then set DBUS value corresponding to path&interface when setting thresholds;
I have a requirement to set the thre
Update threshold to entity-manager
Save path&interface when creating thresholds,and then set DBUS value corresponding to path&interface when setting thresholds;
I have a requirement to set the threshold to restart without losing. In addition, I can see that the threshold can be saved in the file in the entity-manager, which can meet my requirements.
Data flow: Old version: IPMI set threshold -> virtualsensors (DBUS) What I want to achieve: IPMI set threshold -> virtualsensors (DBUS) -> filesystem
I found that it can be implemented as follows: IPMI set threshold -> virtual-sensors (DBUS) -> entitymanager -> filesystem
Because the threshold setting in dbus-sensors is: IPMI set threshold -> dbus-sensors (DBUS) -> entitymanager -> filesystem
Tested:
The following print result shows this process: IPMI set threshold -> virtual sensors (DBUS) -> entitymanager
root@NULL:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/nvme/NVMe_MAX/NVMe_MAX_Temp xyz.openbmc_project.Configuration.ModifiedMedian.Thresholds0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Delete method - - - .Direction property s "greater than" emits-change writable .Name property s "upper critical" emits-change writable .Severity property d 1 emits-change writable .Value property d 116 emits-change writable root@NULL:~# ipmitool sensor list | grep NVM NVMe_MAX_Temp | na | degrees C | na | na | 1.000 | 6.000 | 111.000 | 116.000 | na root@NULL:~# ipmitool sensor thresh NVMe_MAX_Temp ucr 119 Locating sensor record 'NVMe_MAX_Temp'... Setting sensor "NVMe_MAX_Temp" Upper Critical threshold to 119.000 root@NULL:~# ipmitool sensor list | grep NVM NVMe_MAX_Temp | na | degrees C | na | na | 1.000 | 6.000 | 111.000 | 119.000 | na root@NULL:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/nvme/NVMe_MAX/NVMe_MAX_Temp xyz.openbmc_project.Configuration.ModifiedMedian.Thresholds0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Delete method - - - .Direction property s "greater than" emits-change writable .Name property s "upper critical" emits-change writable .Severity property d 1 emits-change writable .Value property d 119 emits-change writable root@NULL:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/nvme/NVMe_MAX/NVMe_MAX_Temp xyz.openbmc_project.Configuration.ModifiedMedian.Thresholds0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Delete method - - - .Direction property s "greater than" emits-change writable .Name property s "upper critical" emits-change writable .Severity property d 1 emits-change writable .Value property d 119 emits-change writable root@NULL:~#
Signed-off-by: Tao Lin <lintao.lc@inspur.com> Change-Id: I0f5eeb06d0b3aaf4f5806bfa68672dedcb087f26
show more ...
|
#
8e11cccb |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8c73d8de128b218ee4885a5e133314ad5d9a0ff8
show more ...
|
#
1dff7dce |
| 27-Jul-2021 |
Rashmica Gupta <rashmica.g@gmail.com> |
Support threshold hysteresis
Add support for a hysteresis value on the warning high/low and critical high/low sensor thresholds. On the high thresholds, this requires the sensor value to dip below
Support threshold hysteresis
Add support for a hysteresis value on the warning high/low and critical high/low sensor thresholds. On the high thresholds, this requires the sensor value to dip below the (threshold - hysteresis) value before the alarm clears, and on the low thresholds it has to go above (threshold + hysteresis).
These are optional fields in the configuration JSON and will default to zero if not present, which results in the previous behavior of not having a hysteresis at all.
Tested: with IBM's Ambient_Virtual_Temp sensor. When changing the value above a high threshold and then back below the threshold, we only see the alarm deasserted when the temp is below (threshold - hysteresis).
Change-Id: Ied1d40def94e1b66cf4ec8826799bada4e6236ab Signed-off-by: Matt Spinler <spinler@us.ibm.com> Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
show more ...
|
#
4294e6d2 |
| 14-Apr-2021 |
George Hung <george.hung@quantatw.com> |
Add to emit the threshold alarm signals
Emit the thresold alarm signals on sensor threshold interface: https://gerrit.openbmc-project.xyz/39899
When the sensor reading exceeds the threshold, it'll
Add to emit the threshold alarm signals
Emit the thresold alarm signals on sensor threshold interface: https://gerrit.openbmc-project.xyz/39899
When the sensor reading exceeds the threshold, it'll send the alarm signal with the sensor value
Tested: Change the threshold to trigger the alarm signal: busctl set-property xyz.openbmc_project.VirtualSensor /xyz/openbmc_project/sensors/temperature/i2cool_0 xyz.openbmc_project.Sensor.Threshold.Critical CriticalHigh d 10
Monitor the signal by the following command: dbus-monitor --system type=signal,member=CriticalHighAlarmAsserted
match the signal: signal time=4282.318610 sender=:1.62 -> destination=(null destination) serial=104431 path=/xyz/openbmc_project/sensors/temperature/i2cool_0; interface=xyz.openbmc_project.Sensor.Threshold.Critical; member=CriticalHighAlarmAsserted double 22
Signed-off-by: George Hung <george.hung@quantatw.com> Change-Id: Iac19745ac8761435ff90bf7c8f7ff1ff14f26f05
show more ...
|
#
b306b03d |
| 01-Feb-2021 |
Matt Spinler <spinler@us.ibm.com> |
Add PerformanceLoss threshold checking
This xyz.openbmc_project.Sensor.Threshold.PerformanceLoss interface will be checked along with the other threshold interfaces. It can be used to indicate the
Add PerformanceLoss threshold checking
This xyz.openbmc_project.Sensor.Threshold.PerformanceLoss interface will be checked along with the other threshold interfaces. It can be used to indicate the system will suffer a performance loss when the sensor goes above/below the high/low threshold values.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I855aaf6ea550e672bf52af5631533049269934d1
show more ...
|
#
fdb826d5 |
| 20-Jan-2021 |
Patrick Williams <patrick@stwcx.xyz> |
thresholds: simplify logic and template
Simplify the Threshold template by turning it into a child-class of the underlying threshold class and reducing corresponding logic / template boilerplate.
S
thresholds: simplify logic and template
Simplify the Threshold template by turning it into a child-class of the underlying threshold class and reducing corresponding logic / template boilerplate.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0333669cf92255f4d365fedcdb23cbeaf52ba696
show more ...
|
#
8f5e6119 |
| 15-Jan-2021 |
Matt Spinler <spinler@us.ibm.com> |
Refactor the threshold checking code
Use threshold template classes so the same code can be used to check each type of threshold.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I04dfed
Refactor the threshold checking code
Use threshold template classes so the same code can be used to check each type of threshold.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I04dfed24a60b30254b9f2dbb26c5cb048a03ab5a
show more ...
|