#
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 ...
|
#
1226f208 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ia9a79a850d4ae8d576f052bb552a83429b792ddb Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
8859c84b |
| 06-Feb-2023 |
Matt Spinler <spinler@us.ibm.com> |
Don't crash if mapper times out
We've seen cases where there is so much going on at once on a system that the mapper will get too busy and calls to it will time out.
When this happens to virtual-se
Don't crash if mapper times out
We've seen cases where there is so much going on at once on a system that the mapper will get too busy and calls to it will time out.
When this happens to virtual-sensors it will core dump and restart, but eventually over time it can accumulate so many restarts that it will hit systemd's restart limit and no longer be restarted.
To avoid this, just do the same thing as when the sensor isn't on D-Bus, which is to ignore that sensor for now and try again the next time the virtual sensor is calculated.
Change-Id: I6a09fe4c56070f1b23c97f66fe38f3b900e02ee9 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
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 ...
|
#
26959667 |
| 28-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
Update to latest clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id:
Update to latest clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I80f24d12c18074b3294b158c2a2a515d548aa0e1
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 ...
|
#
74c1e7d8 |
| 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib7b6d079463ab243e3466ca7bba1cf0da9168d70
show more ...
|
#
82b39c66 |
| 28-Jul-2021 |
Patrick Williams <patrick@stwcx.xyz> |
logging: switch to lg2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If28e6c9c7ae4eae5d17d28e055c90a04750834ac
|
#
187582bd |
| 29-Mar-2021 |
Harvey Wu <Harvey.Wu@quantatw.com> |
dbusUtils: add try catch to catch error when getDbusProperty failed
Avoid to getDbusProperty fail, when sensor service is broken after sensor propertiesChanged signal be triggered. And the
dbusUtils: add try catch to catch error when getDbusProperty failed
Avoid to getDbusProperty fail, when sensor service is broken after sensor propertiesChanged signal be triggered. And then return NaN.
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Ibd73eb27cfd6274ab56ea7d74db98fdd7d7c1734
show more ...
|
#
06e761a2 |
| 13-Nov-2020 |
Patrick Williams <patrick@stwcx.xyz> |
dbus: removed unnecessary is_method_error calls
The sdbusplus `call` methods throw an exception in all cases, so there is no reason to also check the message reply for `is_method_error` conditions.
dbus: removed unnecessary is_method_error calls
The sdbusplus `call` methods throw an exception in all cases, so there is no reason to also check the message reply for `is_method_error` conditions.
https://github.com/openbmc/sdbusplus/blob/c67e1e8730a2d3dcb155b21ced735ee188e8ea7f/include/sdbusplus/bus.hpp#L283
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id5697e4186e3a6794292c736e0c3b248c8b57b82
show more ...
|
#
f8db7225 |
| 10-Nov-2020 |
Matt Spinler <spinler@us.ibm.com> |
Tolerate missing sensors on startup
Instead of crashing if one of the sensors listed in the symbol table isn't on D-Bus yet, return quiet_NaN for its value instead. A quiet_NaN is what most of the
Tolerate missing sensors on startup
Instead of crashing if one of the sensors listed in the symbol table isn't on D-Bus yet, return quiet_NaN for its value instead. A quiet_NaN is what most of the sensor applications (all of the dbus-sensors ones) return anyway when they are not able to read the device, and this can be considered similar to that - that the device isn't accessible yet.
This eases the dependencies necessary in the service file, as the service file as it stands now doesn't wait for any sensor providing services to start, and even if it did different virtual sensors could require different dependencies.
An alternative would be to have the code not even put the virtual sensor on D-Bus until all of its required sensors are available, but that adds quite a bit of complexity when usually there will just be a small window after a reboot when the services area all starting up that this would occur.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ifc9b010774fa1a703ff660abe57c57220cc907b3
show more ...
|
#
7452a867 |
| 11-Aug-2020 |
Vijay Khemka <vijaykhemka@fb.com> |
Add support for dbus parameter
Added support for parameter type dbus sensor and utility functions to read dbus sensor value.
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com> Change-Id: I04db0016f31
Add support for dbus parameter
Added support for parameter type dbus sensor and utility functions to read dbus sensor value.
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com> Change-Id: I04db0016f312edea095442a693500c3b4e571d6c
show more ...
|