History log of /openbmc/dbus-sensors/include/ (Results 126 – 150 of 234)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
c22b842b07-Jul-2020 James Feist <james.feist@linux.intel.com>

CPUSensor: Fix reading failure after DC Cycle

This makes it so the timer is called all of the time
regardless if the async handler has fired. Making it
so that when the handler doesn't respond becau

CPUSensor: Fix reading failure after DC Cycle

This makes it so the timer is called all of the time
regardless if the async handler has fired. Making it
so that when the handler doesn't respond because of
error, we don't have issues.

Tested: DC cycled, continued to get readings

Change-Id: Ib12e172ae93eb6c7bb83876457ce4320822ba56e
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...

961bf09a01-Jul-2020 James Feist <james.feist@linux.intel.com>

Standardize read errors

Each sensor handled read errors their own way,
making it inconsistant. This helps to align them all
in the base class, so that error handling happens the
same for each sensor

Standardize read errors

Each sensor handled read errors their own way,
making it inconsistant. This helps to align them all
in the base class, so that error handling happens the
same for each sensor. It also aligns the power state
change handling.

Tested: Tested DC Cycling and Enabling/Disabling ME to
make sure functional change correctly

Change-Id: I1a191d27629602e1ca3871d933af07b15bf9f331
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...

d7ae29a325-Jun-2020 James Feist <james.feist@linux.intel.com>

ipmbsensor: simplify reading

In reality there are only 4 reading types, no reason
to seperate this out by device type. Simplify it.

Also update PXE VR to use standard READ_TEMP pmbus
command.

Test

ipmbsensor: simplify reading

In reality there are only 4 reading types, no reason
to seperate this out by device type. Simplify it.

Also update PXE VR to use standard READ_TEMP pmbus
command.

Tested: Readings were the same

Change-Id: I707fa0d75c388bf757ad95140361ddb10ad00bd4
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...

67601bdb16-Jun-2020 James Feist <james.feist@linux.intel.com>

Add Available interface

Some sensors become unavailable and this is expected,
this adds the available interface to be able to track
this, and allows an external app to set this in cases
where the se

Add Available interface

Some sensors become unavailable and this is expected,
this adds the available interface to be able to track
this, and allows an external app to set this in cases
where the sensor cannot distinguish that it is not
working.

Tested: Set the property on d-bus, saw the property and
reading change

Change-Id: Ib52ee668caeccc590b95ad2b1ea60470721d28ab
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...

4f45e42909-Jun-2020 Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>

Refactoring of the updateValue method

Purpose of these changes is to make the method created to update any dbus
parameters, not only the `Value`, available for all classes that inherit
from the Sens

Refactoring of the updateValue method

Purpose of these changes is to make the method created to update any dbus
parameters, not only the `Value`, available for all classes that inherit
from the Sensor class.

This commit does following changes:
* method areDifferent is moved from the CPUSensor class to the Sensor.
* method genericUpdateValue is renamed to updateProperty and moved from
the CPUSensor class to the Sensor.
* method updateValue is changed to utilize the updateProperty method.

Tested:
Manual tests where done on CPUSensor. No differences detected comparing
to results taken before these changes.

Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: I736526c0a128ffe094e156018fca6a883659f82a

show more ...

63f3866909-Jun-2020 Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>

Moving some methods from threshold to utils

Two methods splitFileName and readFile seems to be more generic
and used not only by thresholds. Moving splitFileName and readFile
from the threshold name

Moving some methods from threshold to utils

Two methods splitFileName and readFile seems to be more generic
and used not only by thresholds. Moving splitFileName and readFile
from the threshold namespace to utils.

Tested:
Manual tests where done on CPUSensor. No differences detected
comparing to results before these changes.

Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: I8ab58099eca740b6111a382f68f2ab32d7762a78

show more ...

45e9277d04-Jun-2020 Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

Support retrieving 'utilization' from ME

ME exposes sensors which express host CPU utilization in range 0-255.
This change introduces following things:
- 'MESensor' sensor type introduced alongside

Support retrieving 'utilization' from ME

ME exposes sensors which express host CPU utilization in range 0-255.
This change introduces following things:
- 'MESensor' sensor type introduced alongside legacy 'METemp' for clarity
- ability to expose 'utilization' sensor with range 0-100 (percent)
- scaling utilization value from 0-255 to 0-100

Testing:
- added following configuration on platform:
{
"Address": 190,
"Class": "MESensor",
"Name": "Host CPU Core Utilization",
"SensorType": "utilization",
"ScaleValue": 0.392,
"Type": "IpmbSensor"
}
- configuration properly loaded
- sensors appear on D-Bus and Redfish:
{
"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Sensors/Host_CPU_Core_Utilization",
"@odata.type": "#Sensor.v1_0_0.Sensor",
"Id": "Host_CPU_Core_Utilization",
"Name": "Host CPU Core Utilization",
"Reading": 98.784,
"ReadingRangeMax": 100.0,
"ReadingRangeMin": 0.0,
"ReadingUnits": "Percent",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}

Change-Id: I49a14820e1b72f9776bd24ba1584d81ee0c95cd5
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>

show more ...

8d8d8d7c29-May-2020 Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>

Exposing power capping values as a sensor

This implementation introduces support for power capping values provided
by hwmon. Values are read from files with suffix cap, cap_max and cap_min
and are e

Exposing power capping values as a sensor

This implementation introduces support for power capping values provided
by hwmon. Values are read from files with suffix cap, cap_max and cap_min
and are exposed as properties of the interface xyz.openbmc_project.Sensor.Value
The property Value is taken from the power[N]_cap file in a standard way.
While the MaxValue and MinValue are periodically read from the corresponding
files: power[N]_cap_max and power[N]_cap_min. If cap_max, cap_min files cannot
be read properties MinValue/MaxValue are set to 0 unless the power is OFF then
NaN is returned. For other types of files than ‘cap’ default CPUSensor MinValue,
MaxValue values are used as it was before this change.

Link to sysfs file descriptions:
https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface

Tested: Test were done manually, no regression detected.

Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: I72fd85f3f441b8a430b9dadd47c874eec52b7829

show more ...

54ffb27102-Jun-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Fix for service crash - hwmontempsensor

D-Bus object path accepts only "[a-zA-Z0-9_/]+".
If any invalid characters present on path leads to
throw exception at sdbusplus and leads to service
crashes.

Fix for service crash - hwmontempsensor

D-Bus object path accepts only "[a-zA-Z0-9_/]+".
If any invalid characters present on path leads to
throw exception at sdbusplus and leads to service
crashes.

terminate called after throwing an instance of
'sdbusplus::exception::SdBusError'
what(): Invalid path or interface:
org.freedesktop.DBus.Error.InvalidArgs: Invalid argument

Example sensor name: "PCH M.2 Temp"

Replace any invalid characters with "_".

Tested:
No service crashes observed after fix.

Change-Id: Ie487c732db253d01e7c20fa1e79b86a3cca2b263
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...

38fb598328-May-2020 James Feist <james.feist@linux.intel.com>

Update clang format

Update to clang-format-10

Change-Id: I7fcab706fb384e5fcc07a06c42897a5ddbc4b511
Signed-off-by: James Feist <james.feist@linux.intel.com>

f902c05407-May-2020 Yong Li <yong.b.li@linux.intel.com>

Skip property changed signal on threshold initialization

When the sensor threshold config is changed, the sensor will be re-created,
These alarm are initialized as false. In case of there is any ass

Skip property changed signal on threshold initialization

When the sensor threshold config is changed, the sensor will be re-created,
These alarm are initialized as false. In case of there is any asserted event already,
needs to avoid the emit changed signal.

Tested:
Adjust the threshold to trigger the hwmon sensor threshold assert/deassert events,
there is no additional logs
1 | 05/08/20 | 17:07:54 UTC | Temperature #0x4a | Upper Non-critical going high | Asserted
2 | 05/08/20 | 17:08:12 UTC | Temperature #0x4a | Upper Non-critical going high | Deasserted
3 | 05/08/20 | 17:08:22 UTC | Temperature #0x4a | Upper Non-critical going high | Asserted
4 | 05/08/20 | 17:08:26 UTC | Temperature #0x4a | Upper Non-critical going high | Deasserted

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Id152efe8f34a8ea00eb10004660b89c3275090d6

show more ...

10306bd521-Apr-2020 Yong Li <yong.b.li@linux.intel.com>

Stop the timer when the deasserted events occur

A timer will be started if there is any threshold asserted event occurs,
but it is not stopped when the deasserted occurs.
This causes additional asse

Stop the timer when the deasserted events occur

A timer will be started if there is any threshold asserted event occurs,
but it is not stopped when the deasserted occurs.
This causes additional asserted events.
Connected the timer with different threshold, and stop it if deasserted.

Tested:
Adjust the threshold value with ipmitool raw 4 0x26 command, there is no duplicated asserted sel log:
8 | 04/21/20 | 08:00:24 UTC | Voltage P3VBAT | Upper Non-critical going high | Asserted | Reading 3.04 > Threshold 2.57 Volts
9 | 04/21/20 | 08:00:26 UTC | Voltage P3VBAT | Upper Non-critical going high | Deasserted | Reading 3.04 > Threshold 3.28 Volts
a | 04/21/20 | 08:00:45 UTC | Voltage P3VBAT | Upper Non-critical going high | Asserted | Reading 3.04 > Threshold 2.57 Volts
b | 04/21/20 | 08:00:48 UTC | Voltage P3VBAT | Upper Non-critical going high | Deasserted | Reading 3.04 > Threshold 3.28 Volts

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Ia218320c29c34e0bf9ef0604934e04cf0a5701dd

show more ...

1afda6bb09-Apr-2020 Yong Li <yong.b.li@linux.intel.com>

adcsensor: Check if the object is still valid in the async callback functions

Sometimes adcsesnor will crash during stress test.
The root cause is that the object is destroyed already
when the async

adcsensor: Check if the object is still valid in the async callback functions

Sometimes adcsesnor will crash during stress test.
The root cause is that the object is destroyed already
when the async callback functions are executed.
The timer cancel() cannot cancel the expired callback
handlers. When the callback handler is executed,
the object is deleted already.
The buffer used by async_read_util must guarantee
that they remain valid until the handler is called.

Using the weak_ptr to check if the object is still valid
before using these member variables/functions.

Tested:
No adcsensor crash with stress test,
Change the threshold of ADC sensor 0x51 P3VBAT:
while [ true ]; do; \
ipmitool raw 4 0x26 0x51 0x1b 0x20 0x1b 0 0x2a 0x2a 0;\
ipmitool raw 4 0x26 0x51 0x1b 0x20 0x1b 0 0x2a 0x2b 0;\
sleep 1; done

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I2ddb934199e2d0f52a1a6df25c46eadfe06cfda3

show more ...

bf8b1dad15-Apr-2020 Yong Li <yong.b.li@linux.intel.com>

psusensor: Check if the object is still valid in the callback functions

There is a chance that the service will crash if the sensor threshold
is changed. The root cause is that threshold changing wi

psusensor: Check if the object is still valid in the callback functions

There is a chance that the service will crash if the sensor threshold
is changed. The root cause is that threshold changing will trigger
the deletion of sensors object, when the callback handler is executed
after objects destroyed, the variables of objects are invalid.

Adding a weak_ptr in the callback functions to check if the object
is destroyed already, only access the variables if it is valid.

Tested:
Change/query the PSU sensor threshold using ipmi commands
to trigger the sensor re-creation, the threshold config is correct,
and there is no any psusensor crash log.

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Ib8169aeffde18eeaf1a2491d205a808ea15a27d9

show more ...

17aba77609-Apr-2020 Yong Li <yong.b.li@linux.intel.com>

Catch the error on set_value call

Sometimes the adcsensor crashes with the below error:
terminate called after throwing an instance of 'std::system_error'
what(): error setting GPIO line values:

Catch the error on set_value call

Sometimes the adcsensor crashes with the below error:
terminate called after throwing an instance of 'std::system_error'
what(): error setting GPIO line values: Operation not permitted
Aborted (core dumped)

Catch such error to prevent service from crash.

Tested:
Change the threshold values on ADC sensor P3VBAT,
No such crash error

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I05bebb792fc40f458033decd1cca3508af5b770c

show more ...

3046a02403-Apr-2020 Yong Li <yong.b.li@linux.intel.com>

Add beep support for PSU

Spec requires that system will beep with pattern 1-5-1-4
if there is any PSU failure or config error.

Tested:
With two PSUs, disconnect one AC cable, or unplug one PSU,
to

Add beep support for PSU

Spec requires that system will beep with pattern 1-5-1-4
if there is any PSU failure or config error.

Tested:
With two PSUs, disconnect one AC cable, or unplug one PSU,
to trigger the psu failure/config error, there is a beep.

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I8664400164298fa4a35f82b79e4bf417481aabb0

show more ...

0a4c480e01-Apr-2020 Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>

Adding support for power sensor and average values in CPU domain.

Current implementation of CPUSensor exposes on dbus only temperature sensors.
This change allows it to expose also power values unde

Adding support for power sensor and average values in CPU domain.

Current implementation of CPUSensor exposes on dbus only temperature sensors.
This change allows it to expose also power values under a new object
path: /xyz/openbmc_project/sensors/power/

It also introduce support for the average values and their thresholds.

Tested:
After applying this change the same CPU sensors and their thresholds
values are visible on dbus.
Plus additional power sensor appears when available in system.

Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: I0eeadca841ccb279bbd26d16b0b41f66a44f22cd

show more ...

f3fd191525-Mar-2020 Yong Li <yong.b.li@linux.intel.com>

Check if the object is still valid in the timeout callback function

There is a chance that the service will crash
if the sensor threshold is changed.
The root cause is that the timer cancel() API ca

Check if the object is still valid in the timeout callback function

There is a chance that the service will crash
if the sensor threshold is changed.
The root cause is that the timer cancel() API cannot cancel
the already expired callback handlers.
When the callback handler is executed after objects destroyed,
all variables are invalid. Change the object to shared_ptr,
and use a weak_ptr to check if the object is destroyed

Tested:
Change the threshold, to check if there is any service crash log.

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I03044e1071285c8dafa78f47e45b14e63aad66fe

show more ...

6b1247a109-Mar-2020 Cheng C Yang <cheng.c.yang@linux.intel.com>

Fix PSU threshold mismatch issue

When trying to change thresholds on PSU sensors, PSU service will crash.
Some PSU in entity-manager will have threshold0 to threshodl5 which
contains all labels in o

Fix PSU threshold mismatch issue

When trying to change thresholds on PSU sensors, PSU service will crash.
Some PSU in entity-manager will have threshold0 to threshodl5 which
contains all labels in one D-Bus path. But in current dbus sensors,
the presist threshold function do not support labels, it only check
severity. So when change a threshold in PSU sensor, it will change some
incorrect threshold in entity-manger. This patch adds label support to
presist threshold function, so that correct theshold in entity-manager
can be changed.

Tested:
After changed PSU1 Temp1 threshold by ipmitool, check the threshold again,
the value should be changed to the value we set. Check entity-manager,
the threshold in entity-manager should also change to the value we set.

Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: Ib1c8bb454cd42dff170ae33c4aa768c4b515bb44

show more ...

883fb3a927-Feb-2020 Josh Lehan <krellan@google.com>

Clean up logic within updateValue and checkThresholds

Work around problems with floating-point equality
Require small difference in order to publish new value
Always check thresholds, regardless of

Clean up logic within updateValue and checkThresholds

Work around problems with floating-point equality
Require small difference in order to publish new value
Always check thresholds, regardless of magnitude of change
This avoids problem of small change not triggering thresholds
Using "Schmitt trigger" logic to avoid threshold jitter spam
If threshold changed, threshold will always be checked next reading
This avoids problem of threshold changes not taking immediate effect
Added debugging counters for testing checkThresholds

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Ie8a0245382f7ce339ea3cb837a64b3fee119c71e

show more ...

d9d8cafc27-Feb-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Add chassis and inventory associations to PSU Pwm

PSU pwm sensors are not associated with chassis base
board object path. This causes the PSU pwm sensors
not list under chassis redfish object. Added

Add chassis and inventory associations to PSU Pwm

PSU pwm sensors are not associated with chassis base
board object path. This causes the PSU pwm sensors
not list under chassis redfish object. Added chassis
base board path and inventory object path associations
to PSU Pwm Sensors.

Tested:
Get on redfish chassis/<chassis id>/Thermal and
chassis/<chassis id>/sensors redfish URI shows
PSU Pwm sensors.

Change-Id: Ia862ecff058ca43fee38a6f71bdd57f8c135aae2
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...

c82213cc26-Feb-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Add inventory & chassis association to PSU sensors

For PSU sensor object paths, inventory and chassis
associations is missing due to double initialization
of association interface. Due to this PSU i

Add inventory & chassis association to PSU sensors

For PSU sensor object paths, inventory and chassis
associations is missing due to double initialization
of association interface. Due to this PSU information
and PSU sensors are not show up in Redfish under
chassis. Corrected the code to register association
property and initialize it only after filling all
associations.

Tested:
- PowerSupplies information shows up in redfish /<chassisid>/Power
- PSU sensors shows up in redfish /<chassisid>/Thermal
and <chassisid>/sensors

Change-Id: If2a16e55681718d5b21f3d38c5465d36bda65460
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...

a97f134311-Feb-2020 Cheng C Yang <cheng.c.yang@linux.intel.com>

Fix the PSU Service crash issue.

When entity-manager changes, PSU service will crash when recreating
PSU Sensors. Change delay time to 3s for PSU service has enough time
to finish last creating, cha

Fix the PSU Service crash issue.

When entity-manager changes, PSU service will crash when recreating
PSU Sensors. Change delay time to 3s for PSU service has enough time
to finish last creating, change sensor monitoring time to 1s to avoid
sysfs file reading failure.

Tested:
When starting system or reset entity-manager, PSU service will not
crash.

Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: I43e7f5207c137cd3601877af5313a3c340ee05f3

show more ...

f9b01b6d29-Jan-2020 James Feist <james.feist@linux.intel.com>

Add power state check for HwmonTempSensor

We have some sensors that are on DC power, add the
check so this is configurable.

Tested: DC cycled, saw no logs

Change-Id: I0f2fc5c96c46d8c782f4bc364f649

Add power state check for HwmonTempSensor

We have some sensors that are on DC power, add the
check so this is configurable.

Tested: DC cycled, saw no logs

Change-Id: I0f2fc5c96c46d8c782f4bc364f649a9f2f699c3a
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...

ba8a8bfa09-Jan-2020 ZhikuiRen <zhikui.ren@intel.com>

convert sysfs gpio usage to libgpiod

Updated Chassis Intrusion Sensor monitoring
to use pin name and gpiod APIs. Number based sysfs
framework is deprecated and replaced by descriptor
based gpiod fra

convert sysfs gpio usage to libgpiod

Updated Chassis Intrusion Sensor monitoring
to use pin name and gpiod APIs. Number based sysfs
framework is deprecated and replaced by descriptor
based gpiod framework. With named gpio pin,
code is more portable provided the device tree
defines GPIO pin name consistently.

This requires device tree change (227661) and
configuration file change (entity-manager/+/28350)

Tested:
Build and run changes together and verified chassis intrusion sensor
value gets updated correctly through D-Bus object.

Signed-off-by: ZhikuiRen <zhikui.ren@intel.com>
Change-Id: I03c50e32059936902432d5a8bc498dabb812ea5e

show more ...

12345678910