History log of /openbmc/phosphor-virtual-sensor/ (Results 76 – 100 of 116)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
67d8b9d229-Jun-2021 Rashmica Gupta <rashmica.g@gmail.com>

Add check for sensor with same name

Don't add a virtual sensor if one with the same name already exists.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Change-Id: I8efe6488dbae5f6c00e1540407f

Add check for sensor with same name

Don't add a virtual sensor if one with the same name already exists.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Change-Id: I8efe6488dbae5f6c00e1540407fa8d8138a6bed1

show more ...

665a0a2929-Jun-2021 Rashmica Gupta <rashmica.g@gmail.com>

Replace spaces in sensor name with underscores

Sensors don't have spaces in their names on D-Bus so if the user gives
us a name with spaces in it, convert them to underscores.

Signed-off-by: Rashmi

Replace spaces in sensor name with underscores

Sensors don't have spaces in their names on D-Bus so if the user gives
us a name with spaces in it, convert them to underscores.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Change-Id: Ia6ad6de62a605a873f5bab40d1d3bf859c32c57b

show more ...

1846d82223-Jun-2021 Patrick Williams <patrick@stwcx.xyz>

logging: remove spaces in entry definition

phosphor-logging / journald does not allow a space in entry
headers. Change "FOO = %s" entry definitions to "FOO=%s".

Tested: After change observe loggin

logging: remove spaces in entry definition

phosphor-logging / journald does not allow a space in entry
headers. Change "FOO = %s" entry definitions to "FOO=%s".

Tested: After change observe logging entries using `journalctl
--output json-pretty` and see the FILENAME appear in an entry.

"FILENAME" : "/usr/share/phosphor-virtual-sensor/virtual_sensor_config.json",

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iff035554db5e65c54cceb23cf203d72872ad1455

show more ...

3e99919b09-Jun-2021 Rashmica Gupta <rashmica.g@gmail.com>

add create_threshold function

Move threshold logic into a seperate function for later changes.

Change-Id: I9dadb014ee42fc19ba686413dfa2c0da70f2582f
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.c

add create_threshold function

Move threshold logic into a seperate function for later changes.

Change-Id: I9dadb014ee42fc19ba686413dfa2c0da70f2582f
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>

show more ...

0fcf0e1c03-Jun-2021 Lei YU <yulei.sh@bytedance.com>

Add association interface

Make the virtual sensor inherit association interface, so that a sensor
could be associated with an inventory.
This is needed for Redfish to get the virtual sensor.

The js

Add association interface

Make the virtual sensor inherit association interface, so that a sensor
could be associated with an inventory.
This is needed for Redfish to get the virtual sensor.

The json config could add optional "Association" config, that is an
array of tuples with three strings.
The virtual sensor will parse the config and create the association
accordingly.

Tested: Add below json config, and verify the virtual sensor has the
association with the inventory DBus object, and the Redfish
could show the sensor.

"Associations":
[
[
"chassis",
"all_sensors",
"/xyz/openbmc_project/inventory/system/board/xxxx"
]
],

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ife4b6c38449ed0f29ab6d37f80b87c31df9ee24e

show more ...

543bf66829-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

add clamping of min/max

Ensure that the value of the sensor is clamped to be within the
limits imposed by the min/max of the sensor. Presently, these
limits may be defaulted by the object definitio

add clamping of min/max

Ensure that the value of the sensor is clamped to be within the
limits imposed by the min/max of the sensor. Presently, these
limits may be defaulted by the object definition (to +/- infinity)
or set via config.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iceaea40daaba1324fd76122843b5520acb4a7726

show more ...

f644374209-Apr-2021 Harvey Wu <Harvey.Wu@quantatw.com>

Add MaxValue/MinValue setting in config

- Adding MaxValue, MinValue setting in json config file,
so sel-logger could show correct sensor value on journal log
if user set MaxValue, MinValue in co

Add MaxValue/MinValue setting in config

- Adding MaxValue, MinValue setting in json config file,
so sel-logger could show correct sensor value on journal log
if user set MaxValue, MinValue in config.

Tested:
- set MaxValue: 127, MinValue: -128

- modified virtual sensor formula to let trigger CriticalHigh

- trigger threshold and see journal log and sel log
Jan 01 00:48:29 gbs sel-logger[435]: i2cool_0 sensor crossed a warning high threshold going high. Reading=57.000000 Threshold=35.000000.
Jan 01 00:48:29 gbs sel-logger[435]: i2cool_0 sensor crossed a critical high threshold going high. Reading=57.000000 Threshold=35.000000.

1 | Pre-Init |0000002909| Temperature i2cool_0 | Upper Critical going high | Asserted | Reading 57 > Threshold 35 degrees C

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I6d908fc206ef9c50316df606f71f47316ae6f9cf
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

d9aa227927-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

build: fix dependency check for nlohmann/json

Fix the following error observed in Yocto bump:

| Has header "nlomann/json.hpp" : NO
|
| ../git/meson.build:24:4: ERROR: Automatic wrap-bas

build: fix dependency check for nlohmann/json

Fix the following error observed in Yocto bump:

| Has header "nlomann/json.hpp" : NO
|
| ../git/meson.build:24:4: ERROR: Automatic wrap-based subproject downloading is disabled
|

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I71a052f11d7d50c58ff5b16d124c54b636888f96

show more ...

202842d816-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

build: update to C++20

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2708fb4ccfc75e4f857603ede96a93011eaaae08

8d5dff5a16-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

build: add wrapfiles for dependencies

Update meson.build and add wrapfiles so that all dependencies
are handled as subprojects. This allows builds completely
outside of bitbake or an SDK.

Signed-o

build: add wrapfiles for dependencies

Update meson.build and add wrapfiles so that all dependencies
are handled as subprojects. This allows builds completely
outside of bitbake or an SDK.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id9e46013671d1d407b13549c29c15770c1c6fb2c

show more ...

a55a907e06-Apr-2021 Thu Ba Nguyen <thu@os.amperecomputing.com>

Add try catch when getting the sensor values

When the driver of the source sensors is binding, the sensor service name
is available but the value property can be unavailable in short time.
Getting t

Add try catch when getting the sensor values

When the driver of the source sensors is binding, the sensor service name
is available but the value property can be unavailable in short time.
Getting the sensor value without try catch can cause exception "sd_bus_call: \
org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable".
This commit catchs the exception when getting sensor value to cover that case.

Signed-off-by: Thu Ba Nguyen <thu@os.amperecomputing.com>
Change-Id: If946f20e38020767d418d6d80caf4e74db7b49ab

show more ...

4294e6d214-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 ...

4f3e9c5f20-Apr-2021 Lei YU <yulei.sh@bytedance.com>

service: Always restart

The service may fail in case it gets exception on DBus, e.g. when BMC is
super busy and it gets "org.freedesktop.DBus.Error.Timeout" exception.

Make this service always rest

service: Always restart

The service may fail in case it gets exception on DBus, e.g. when BMC is
super busy and it gets "org.freedesktop.DBus.Error.Timeout" exception.

Make this service always restart so that it could always come back.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ib906d0a3c9cf5e79109099893454b2a78b4e495f

show more ...

187582bd29-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 ...

2b56ddb313-Jan-2021 Kumar Thangavel <thangavel.k@hcl.com>

Add airflow sensor support in phosphor-virtual-sensor

TESTED : Built Facebook YosemiteV2 images and loaded on the target hardware.
Verified the dbus objects created for airflow sensor under virtual-

Add airflow sensor support in phosphor-virtual-sensor

TESTED : Built Facebook YosemiteV2 images and loaded on the target hardware.
Verified the dbus objects created for airflow sensor under virtual-sensor.

Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: I85cbce561785622d08ea5afcfbe06f2ba34d74f8

show more ...

b306b03d01-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 ...

a4fe665d28-Jan-2021 Matt Spinler <spinler@us.ibm.com>

Fix threshold checks

With the previous code, if the alarm was already set and the value was
still above the threshold, then the statement
if (!alarmHigh && value >= threshold->high() || alarmHig

Fix threshold checks

With the previous code, if the alarm was already set and the value was
still above the threshold, then the statement
if (!alarmHigh && value >= threshold->high() || alarmHigh)

would pass due to the '|| alarmHigh' but the code inside that block
would then think the alarm should deassert. This commit adds code to
also check if the value is below the high threshold if the alarmHigh is
set, and does a similar check for the alarmLow section.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I673de7154959133d48c524b85a680e7d523aa6a5

show more ...

fdb826d520-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 ...

efd4cd8220-Jan-2021 Patrick Williams <patrick@stwcx.xyz>

MAINTAINERS: update email address for Vijay

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I45584e23564c470dbd85a8a24486f48dd3c052a2

8f5e611915-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 ...

f15189e315-Jan-2021 Matt Spinler <spinler@us.ibm.com>

Use NaN for missing warning/crit threshold values

Handle loading the Warning and Critical threshold interfaces like the
hard/soft shutdown ones and use NaN if a low or high value is missing in
the J

Use NaN for missing warning/crit threshold values

Handle loading the Warning and Critical threshold interfaces like the
hard/soft shutdown ones and use NaN if a low or high value is missing in
the JSON, assuming the other one is there.

Using NaN means the threshold alarm will never be tripped for that
property.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib6b6d3a657df8e77ea4c7e5a491ea367693c5951

show more ...

ce67522814-Jan-2021 Matt Spinler <spinler@us.ibm.com>

Add support for hard and soft shutdown thresholds

Add support for the new SoftShutdown and HardShutdown sensor threshold
D-Bus interfaces. These are optional, so if they aren't in the JSON
config f

Add support for hard and soft shutdown thresholds

Add support for the new SoftShutdown and HardShutdown sensor threshold
D-Bus interfaces. These are optional, so if they aren't in the JSON
config file then the code won't put them on D-Bus.

At least one of the low or high values needs to be in the JSON for the
interface to be created. If there is only one, then NaN will be used
for the missing threshold value to indicate 'not applicable' as the
phosphor-dbus-interfaces yaml definition states.

Since these new interfaces are optional, they cannot be base classes of
the VirtualSensor class as the other threshold interface classes were,
so they are members of the class instead. To keep all of the threshold
classes consistent, the warning and critical threshold objects were also
changed to be members.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I099f83ca085e7febd4416c581a19716a83c9d133

show more ...

6c19e7d212-Jan-2021 Matt Spinler <spinler@us.ibm.com>

Add object manager interface

Add the org.freedesktop.DBus.ObjectManager interface to the root path
"/" so that InterfacesAdded signals are emitted.

The "/" path was chosen as it's the same path tha

Add object manager interface

Add the org.freedesktop.DBus.ObjectManager interface to the root path
"/" so that InterfacesAdded signals are emitted.

The "/" path was chosen as it's the same path that the dbus-sensors
applications use for their object managers.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I842ad6affe1db780408f22a2d98160d8dddaa828

show more ...

26edaad401-Dec-2020 Matt Spinler <spinler@us.ibm.com>

Refactor checking thresholds

Made the following fixes to the code that checks sensor thresholds:

1) Check warning thresholds before critical ones.
There may be external actions taken on the war

Refactor checking thresholds

Made the following fixes to the code that checks sensor thresholds:

1) Check warning thresholds before critical ones.
There may be external actions taken on the warning alarm even if the
critical alarm is also passed, so always check the warning alarm and
check it first so that a sensor jump from nominal to over critical
still hits the warning alarm first, just as it would if it had taken
smaller steps.

2) Change the threshold checks to >= and <=.
This matches how the threshold checking is done in dbus-sensors and
phosphor-hwmon.

3) Change the log level from ERR to INFO on the low threshold deasserts.
This matches how it was done when deasserting the high threshold
alarms.

Change-Id: I28781891e0cf06195a22303fa2f93fdc39404e3c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...

06e761a213-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 ...

12345