History log of /openbmc/dbus-sensors/include/ (Results 51 – 75 of 234)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
a771f6a714-Jan-2022 Ed Tanous <edtanous@google.com>

Enable cppcoreguidelines-init-variables

We try to enforce this rule, but clearly the robot can do a better job.
Enable the rule, and for init of all variables that clang-tidy finds in
error.

Signed

Enable cppcoreguidelines-init-variables

We try to enforce this rule, but clearly the robot can do a better job.
Enable the rule, and for init of all variables that clang-tidy finds in
error.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Icf64bc51b3180de29f7e92fa5c5f636e6b1462a6

show more ...

091c92c011-Jan-2022 Jayashree Dhanapal <jayashree-d@hcl.com>

Add Softshutdown and Hardshutdown threshold interface

Added threshold interfaces like Softshutdown and Hardshutdown
interfaces in dbus-sensors. This is similiar to warning and
critical threshold int

Add Softshutdown and Hardshutdown threshold interface

Added threshold interfaces like Softshutdown and Hardshutdown
interfaces in dbus-sensors. This is similiar to warning and
critical threshold interfaces.

To enable this Softshutdown and Hardshutdown interfaces, need to
set the Severity level in EM config. Severity value as 2 for
Softshutdown and Severity value as 3 for Hardshutdown.

TESTED: Tested on Facebook YosemiteV2 hardware. Verified the
Hardshutdown and Softshutdown interfaces are created
and displaying in dbus objects.

Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Change-Id: Ic9a6e719a8343321f894bc031688a17a3ed7fd67

show more ...

5667808a04-Jan-2022 Jayashree Dhanapal <jayashree-d@hcl.com>

Move threshold interfaces to common function

Threshold Hardshutdown and Softshutdown interfaces needs to be
created for sensors. Therefore, created a common function
called getInterface() to access

Move threshold interfaces to common function

Threshold Hardshutdown and Softshutdown interfaces needs to be
created for sensors. Therefore, created a common function
called getInterface() to access all the threshold
interfaces from all the sensors source file and removed
hasCriticalInterface(), hasWarningInterface() functions.

Moreover, threshold interfaces from all the sensor constructor has
been refactored to avoid duplicating functions.

TESTED: Tested on Facebook YosemiteV2 hardware. Verified that the
Warning and Critical interfaces are created and displaying in
dbus objects.

Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Change-Id: I9c7d049c7d4445d7199bf63d8e729838990880e9

show more ...

45f2702d07-Dec-2021 Jayashree Dhanapal <jayashree-d@hcl.com>

Refactoring threshold properties code.

Multiple threshold interfaces like Hardshutdown and Softshutdown
needs to be created for sensors. Therefore, array has been created
to store multiple propertie

Refactoring threshold properties code.

Multiple threshold interfaces like Hardshutdown and Softshutdown
needs to be created for sensors. Therefore, array has been created
to store multiple properties of thresholds.

Threshold level, direction and properties can be accessed based on
the array created. Moreover, lines of code has been reduced by
refactoring existing threshold code.

TESTED: Tested on Facebook YosemiteV2 hardware. Verified that the
Warning and Critical interfaces and properties are created and
displaying in dbus objects.

Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Change-Id: I98be6dd723a6f66336147ec572f161a6c5df3691

show more ...

3db6f9cd07-Dec-2021 Andrew Jeffery <andrew@aj.id.au>

NVMeContext: Add the ability to remove NVMeSensors

Sometimes sensors go away, e.g. with drive hot-unplug. Make sure we have
the ability to remove them from the set of monitored sensors.

Change-Id:

NVMeContext: Add the ability to remove NVMeSensors

Sometimes sensors go away, e.g. with drive hot-unplug. Make sure we have
the ability to remove them from the set of monitored sensors.

Change-Id: Ifdd51aebfc1c0be964b98db1bde534f539c3f911
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

0c23fc3a08-Dec-2021 Andrew Jeffery <andrew@aj.id.au>

NVMeSensor: Centralise configuration type

The objectType populated in the Sensor instance was different to the
configuration name used by NVMeSensorMain, which lead to sensors not
being removed with

NVMeSensor: Centralise configuration type

The objectType populated in the Sensor instance was different to the
configuration name used by NVMeSensorMain, which lead to sensors not
being removed with their EntityManager configuration went away.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ifa3c8f41fa8367d8fae62fe0d9b63a2b1675b53f

show more ...

6a4e973820-Oct-2021 Lei YU <yulei.sh@bytedance.com>

utils: Refactor findFiles()

The findFiles() iterates the directory recursively. For CPU sensor it
was using depth 6 to iterate the PECI devices, and it results in
iterating all the devices in /sys/b

utils: Refactor findFiles()

The findFiles() iterates the directory recursively. For CPU sensor it
was using depth 6 to iterate the PECI devices, and it results in
iterating all the devices in /sys/bus/platform because it contains a
symlink of `subsystem` to `/sys/bus/platform`.

Refactor this function and make sure it skips iterating if a subdir does
not match the regex.

Tested: On g220a, the iterated files reduce from about 40000 to 400,
and the function execution time reduces from 30s+ to about 0.5s.

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

show more ...

0e68f19905-Aug-2021 Paul Fertser <fercerpav@gmail.com>

Revert "Add beep support for PSU"

This reverts commit 3046a0242cfde0cbf871f632c2c143b48ac30c71.

Apparently nobody knows what this was meant for, and having useless code
around is confusing.

Citing

Revert "Add beep support for PSU"

This reverts commit 3046a0242cfde0cbf871f632c2c143b48ac30c71.

Apparently nobody knows what this was meant for, and having useless code
around is confusing.

Citing Ed Tanous: "This is likely leftover cruft from pulling
dbus-sensors into mainline."
(https://lists.ozlabs.org/pipermail/openbmc/2021-August/027166.html)

Change-Id: I92256d594ce7ca37b957fe86a2d99d9cc9c315af
Signed-off-by: Paul Fertser <fercerpav@gmail.com>

show more ...

544e7dc529-Jul-2021 Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>

DPS310 temperature pressure, SI7020 temperature

Infineon DPS310 pressure and temperature sensors for the Blyth
and Storm King Panel, as well as the Silicon Laboratories
SI7020 type sensors. This pr

DPS310 temperature pressure, SI7020 temperature

Infineon DPS310 pressure and temperature sensors for the Blyth
and Storm King Panel, as well as the Silicon Laboratories
SI7020 type sensors. This provide OpenBMC with the ability
to have the DPS310 pressure and temperature sensors also the
Silicon Laboratories SI7020 type sensors provide OpenBMC
with temperature sensor on dbus via dbus-sensors through
HwmonTempSensor. And adds "pressure" as a type of sensor.
Changed sensorScaleFactor to have offsetValue and scaleValue
for _raw IIO devices, scaleValue is a multiplier where
sensorScaleFactor was a divisor. Pulling this into HwmonTempSensor
came about from this Discord discussion:
https://discord.com/channels/775381525260664832/775381525260664836/869641817220595772

Tested: on Rainier's Blyth and Everest's Storm King Op Panels
busctl tree --no-pager xyz.openbmc_project.HwmonTempSensor
busctl introspect --no-pager xyz.openbmc_project.HwmonTempSensor \
/xyz/openbmc_project/sensors/temperature/Ambient_0_Temp
busctl introspect --no-pager xyz.openbmc_project.HwmonTempSensor \
/xyz/openbmc_project/sensors/temperature/Ambient_1_Temp
busctl introspect --no-pager xyz.openbmc_project.HwmonTempSensor \
/xyz/openbmc_project/sensors/temperature/Ambient_2_Temp
busctl introspect --no-pager xyz.openbmc_project.HwmonTempSensor \
/xyz/openbmc_project/sensors/temperature/PCIE_0_Temp
busctl introspect --no-pager xyz.openbmc_project.HwmonTempSensor \
/xyz/openbmc_project/sensors/temperature/PCIE_1_Temp
busctl introspect --no-pager xyz.openbmc_project.HwmonTempSensor \
/xyz/openbmc_project/sensors/pressure/Station_Pressure
Results consistent with location of the systems.

Signed-off-by: Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>
Change-Id: I5c0d56b486a671ee507c7bfe18fea72e7eaf9ebe

show more ...

04d0506629-Oct-2021 Arun P. Mohanan <arun.p.m@linux.intel.com>

cpuSensor:Check object validity in async callback

Sometimes the cpusensor crash was observed. The coredump was pointing
to segmentation fault while executing callback function inside
setupRead().
Si

cpuSensor:Check object validity in async callback

Sometimes the cpusensor crash was observed. The coredump was pointing
to segmentation fault while executing callback function inside
setupRead().
Similar issue was observed in adcsensor.
Reference to the fix: 1afda6bbb6db0e266795af3229b962c32775b928

The timer cancel() in destructor cannot cancel the expired callback
handlers. In such cases if the callback handler is executed, the
object is deleted already.

Use weak_ptr to check if the object is still valid before using these
member variables/functions.
The buffer used by async_read_util must guarantee that they remain
valid until the handler is called.

Tested: Stress tested by restarting the service. Service restart will
force re-creating the CPUSensor objects.
`count=0; \
while true; \
do systemctl restart xyz.openbmc_project.cpusensor.service; \
count=$((count + 1)); \
echo $count; \
sleep 40; \
done `

Signed-off-by: gokulsanker <gokul.sanker.v.g@intel.com>
Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
Change-Id: I7410feb0e17c5f6d555cd042f5e5b327de1910c5

show more ...

77518b2805-Nov-2021 Ed Tanous <edtanous@google.com>

Fix possible seg faults in Cpu and tach

readBuf is used by inputDev in these cases to build a buffer. If the
sensor object is being destroyed while a read is in progress, the
destructor for inputDe

Fix possible seg faults in Cpu and tach

readBuf is used by inputDev in these cases to build a buffer. If the
sensor object is being destroyed while a read is in progress, the
destructor for inputDev will happen after the destructor for readBuf,
which causes an ownership problem, and likely will cause a seg fault.

Tested: Code compiles. No further testing done at this point.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic7d9103a9e9c51315801b7cb213662ea3332a16c

show more ...

da98f09501-Nov-2021 Zhikui Ren <zhikui.ren@intel.com>

psusensor: fix psu pwm sensor name

Current bug is that psusensor service does not create pwm sensor object
if pid fan configuration has spaces in Name field, like
{
...
"Name" : "PSU$BUS $ADDRESS Fa

psusensor: fix psu pwm sensor name

Current bug is that psusensor service does not create pwm sensor object
if pid fan configuration has spaces in Name field, like
{
...
"Name" : "PSU$BUS $ADDRESS Fan 1"
"Outputs": [
"Pwm PSU$BUS $ADDRESS Fan 1"
],
...
}

Fix:
Pwm name need to be escaped, which currently replaces " " with "_"
before being passed to CreatePwmSensor in PSUSensor service.
PwmSensor constructor takes the name as is.

Since the escape algorithm may change in the future,
add a helper function escapeName() and update dbus-sensors
to use this helper funtion when sensors are created.
escapeName() currently calls boost replace_all_copy(name," ", "_"),
so it does not introduce functional changes except the bug identified
above.

Tested:
No regression found for existing working sensors.
Sensors are created as before with the same sensor name.

Fix for non-working case works correctly now.
psu pwm sensor name with space are created correctly with the change.
busctl tree xyz.openbmc_project.PSUSensor
...
|-/xyz/openbmc_project/control
| `-/xyz/openbmc_project/control/fanpwm
| |-/xyz/openbmc_project/control/fanpwm/Pwm_PSU17_2_Fan_1
| |-/xyz/openbmc_project/control/fanpwm/Pwm_PSU17_2_Fan_2
...

Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: If3b60f93de324e59cc3d774285c23bf50a6f989c

show more ...

3291b9c729-Jul-2021 Jie Yang <jjy@google.com>

Sensor mutability interface

We proposed a ValueMutablity interface in
openbmc/phosphor-dbus-interfaces which was accepted here:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/

Sensor mutability interface

We proposed a ValueMutablity interface in
openbmc/phosphor-dbus-interfaces which was accepted here:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/36333

It follows the IPMI fashion, checking
the sensor mutability before writing sensor values. The sensor
mutability used to be hardcoded in the ipmi sensor map yaml file.

This provides feature parity with that old YAML hardcoded
"mutability: Mutability::Write|Mutability::Read" setting.

As an example of implementation within dbus-sensors, ExternalSensor
always sets Mutable to true, given its purpose of accepting sensor
writes from an external source. PwmSensor accepts the "Mutable"
parameter, from entity-manager configuration (aka JSON file). All
other sensors always set Mutable to false, but it would be
straightforward to add similar code, like what was done for
PwmSensor, when mutability is desired.

This parameter will be used by the IPMI server here:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/45407

There is currently no Redfish equivalent, although that would
be a welcome task for the future. This is not IPMI-specific,
as the Redfish server can also use this as a hint, as to whether
to allow read-write access, or merely to allow read-only access.

This is not to be confused with the "manufacturing mode" option, which
is designed for use during manufacturing test, hence its name. This
feature is designed for production, and is intended to allow just a
few sensors to be writable, without needing to make them all writable.

Tested:
DBus call on fan sensors with configurable tree mutability:
busctl introspect xyz.openbmc_project.FanSensor /xyz/openbmc_project/sensors/fan_pwm/fan0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Sensor.Value interface - - -
.MaxValue property x 100 emits-change
.MinValue property x 0 emits-change
.Unit property s "xyz.openbmc_project.Sensor.Value.Uni... emits-change
.Value property d 42.7451 emits-change writable
xyz.openbmc_project.Sensor.ValueMutability interface - - -
.Mutable property b true emits-change
...

DBus call on external sensors:
busctl introspect xyz.openbmc_project.ExternalSensor /xyz/openbmc_project/sensors/tempera
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Sensor.Value interface - - -
.MaxValue property d 127 emits-change
.MinValue property d -128 emits-change
.Unit property s "DegreesC" emits-change
.Value property d nan emits-change writable
xyz.openbmc_project.Sensor.ValueMutability interface - - -
.Mutable property b true emits-change
...

The ValueMutability interface, with "Mutable", is correctly created.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: Ifa1cb51bb55cd6f00d2a2f79e9064d1a51354b06
Signed-off-by: Josh Lehan <krellan@google.com>

show more ...

26601e8906-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

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

3fed674229-Sep-2021 Agata Wiatrowska <agata.wiatrowska@intel.com>

Revert "Reading min and max values from the rated files exposed by hwmon"

This reverts commit 484b9b37530a52f10a606abff23b345a4ec6ab2a.

Reason for revert: <Rated values exposed by hwmon can be inad

Revert "Reading min and max values from the rated files exposed by hwmon"

This reverts commit 484b9b37530a52f10a606abff23b345a4ec6ab2a.

Reason for revert: <Rated values exposed by hwmon can be inadequate
for MinValue/MaxValue sensor properties. Values read
from power_rated_max hwmon file can be lower than maximal possible
power peak for PSU.>

Change-Id: I7e7537f9a309e8256cabc31f1b9115affb357d9d
Signed-off-by: Agata Wiatrowska <agata.wiatrowska@intel.com>

show more ...

1e34ceca31-Aug-2021 Rashmica Gupta <rashmica.g@gmail.com>

thresholds: support hysteresis field if supplied

At the moment dbus-sensors that use thresholds use a default hysteresis
of (max - min) * 0.01. If a hysteresis field is specified for a
threshold tha

thresholds: support hysteresis field if supplied

At the moment dbus-sensors that use thresholds use a default hysteresis
of (max - min) * 0.01. If a hysteresis field is specified for a
threshold that is not NaN, use that instead.

Tested by giving a sensor multiple thresholds, with and without
hysteresis, changing the value of the sensor and observing that the
threshold alarms are asserted and deasserted as expected.

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

show more ...

e3e3c97a26-May-2021 Andrew Jeffery <andrew@aj.id.au>

nvmesensor: Support the NVMe MI basic management command

The NVMe MI basic management command is an optional extension to the
NVMe specification that allows management controllers to query drive
sta

nvmesensor: Support the NVMe MI basic management command

The NVMe MI basic management command is an optional extension to the
NVMe specification that allows management controllers to query drive
state without needing an MCTP stack[1].

[1] https://nvmexpress.org/wp-content/uploads/NVMe_Management_-_Technical_Note_on_Basic_Management_Command.pdf

Given the current lack of support for the SMBus MCTP binding in upstream
OpenBMC, provide an NVMe MI basic management command implementation that
allows nvmesensor to function without diving into a maze of out-of-tree
patches.

As we're doing this in userspace we exploit Linux's I2C chardev
interface for talking to the drives. However, the interface is driven by
ioctl()s, which interacts poorly with the event-driven ASIO design.

Click the lego together by using an IO thread to transform ioctl()s into
read() and write() operations that we can handle asynchronously.

Change-Id: I08cca4991a2ddea23fe8fcc1cf5365d4baded11c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

0c42f40e27-Aug-2021 Patrick Williams <patrick@stwcx.xyz>

logging: replace direct journal calls with lg2

Tested:

Created a bogus journal message equivalent to the one in
TachSensor.hpp as the first line of 'main' in FanMain.cpp:

```
auto device = "Fo

logging: replace direct journal calls with lg2

Tested:

Created a bogus journal message equivalent to the one in
TachSensor.hpp as the first line of 'main' in FanMain.cpp:

```
auto device = "FooBar";
auto msg = "OpenBMC.0.1.FanInserted";
lg2::error("Fan Inserted", "REDFISH_MESSAGE_ID", msg,
"REDFISH_MESSAGE_ARGS", device);
```

Observed the following in the journal:
```
{
"_MACHINE_ID" : "115e76f3bc47411eb0f20075b13444e9",
"_CMDLINE" : "/usr/bin/fansensor",
"REDFISH_MESSAGE_ID" : "OpenBMC.0.1.FanInserted",
"CODE_LINE" : "463",
"_COMM" : "fansensor",
"_EXE" : "/usr/bin/fansensor",
"_SOURCE_REALTIME_TIMESTAMP" : "33256618",
"__MONOTONIC_TIMESTAMP" : "33256849",
"SYSLOG_IDENTIFIER" : "fansensor",
"PRIORITY" : "3",
"_CAP_EFFECTIVE" : "1ffffffffff",
"_PID" : "296",
"_UID" : "0",
"_SYSTEMD_UNIT" : "xyz.openbmc_project.fansensor.service",
"REDFISH_MESSAGE_ARGS" : "FooBar",
"__REALTIME_TIMESTAMP" : "33256822",
"LOG2_FMTMSG" : "Fan Inserted",
"_SYSTEMD_CGROUP" : "/system.slice/xyz.openbmc_project.fansensor.service",
"_GID" : "0",
"_TRANSPORT" : "journal",
"__CURSOR" : "s=039afc05fc934fe08b77dd73c4092591;i=1ff;b=5ad25f16b9bd424ebe72cf30558fcdc2;m=1fb7591;t=1fb7576;x=617adeeaf1da9edc",
"CODE_FILE" : "../../../../../../../../sync/openbmc-sources/dbus-sensors/src/FanMain.cpp",
"_SYSTEMD_INVOCATION_ID" : "9eef21c4b7784ba2aa2628f162079cd3",
"CODE_FUNC" : "int main()",
"MESSAGE" : "Fan Inserted",
"_HOSTNAME" : "bletchley",
"_SYSTEMD_SLICE" : "system.slice",
"_BOOT_ID" : "5ad25f16b9bd424ebe72cf30558fcdc2"
}
```

Observed the following in /var/log/redfish:
```
1970-01-01T00:00:27.345477+00:00 OpenBMC.0.1.FanInserted,FooBar
```

Observed the following in Redfish:
```
{
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/27",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "1970-01-01T00:00:27+00:00",
"EntryType": "Event",
"Id": "27",
"Message": "FooBar inserted.",
"MessageArgs": [
"FooBar"
],
"MessageId": "OpenBMC.0.1.FanInserted",
"Name": "System Event Log Entry",
"Severity": "OK"
}
```

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

show more ...

8a17c30302-Sep-2021 Ed Tanous <edtanous@google.com>

Make dbus-sensors compile with clang-13

clang-13 finds a lot more warnings for unused variables than it used to,
and also picks up some warnings about errant std::moves that are in
place.

This comm

Make dbus-sensors compile with clang-13

clang-13 finds a lot more warnings for unused variables than it used to,
and also picks up some warnings about errant std::moves that are in
place.

This commit fixes them.

Tested:
code compiles against clang-13

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I80864287b7131acfe936c4b28afaf34ababb3029

show more ...

379b113102-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

sensor: remove exception in error path

Any ASIO property callback handler should *not* throw an exception.
This will crash the application because there is nothing in the
ASIO stack that catches the

sensor: remove exception in error path

Any ASIO property callback handler should *not* throw an exception.
This will crash the application because there is nothing in the
ASIO stack that catches the exception and turns it into an
sd_bus_error.

It is also invalid to construct an SdBusError because it is an
internal class type of sdbusplus.

Instead of throwing the bad exception and crashing the sensor
application, print an error message and return the intended
-ERRNO (EACCES), so that sd_bus will pass it back along to the
dbus client as an sd_bus_error response.

The behavior of the underlying sd_bus library can be observed at:
https://github.com/systemd/systemd/blob/a4121e965f43bc323ec3c0ac212cee9d339f7be0/src/libsystemd/sd-bus/bus-objects.c#L520
https://github.com/systemd/systemd/blob/a4121e965f43bc323ec3c0ac212cee9d339f7be0/src/libsystemd/sd-bus/bus-objects.c#L683

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

show more ...

c7a1ae6b30-Apr-2021 Konstantin Aladyshev <aladyshev22@gmail.com>

psusensor: Add support for the 'PowerState' parameter

When CPU is powered off, some sensor reading values are expected
to go below low thresholds. To prevent unnecessary sensor readings
and redundan

psusensor: Add support for the 'PowerState' parameter

When CPU is powered off, some sensor reading values are expected
to go below low thresholds. To prevent unnecessary sensor readings
and redundant threshold event trigger in cases like that add support
for the 'PowerState' JSON configuration parameter similar to other
'dbus-sensors' apps.
Use 'checkThresholdsPowerDelay' function in a threshold check like
it is done in ADCSensor app. This is necessary as PSU data can drop
faster than a change in a power state is noticed.

Tested on the AMD EthanolX CRB with ISL68137:

When the PowerState is set to "On" and the platform is powered off,
no transactions are observed on the corresponding I2C bus.

When the PowerState is set to "Always" monitoring is always enabled
and I2C transactions are always observed regardless the platform
power state.

These commands were used to monitor transactions
on the I2C bus:
$ echo 1 > /sys/kernel/debug/tracing/tracing_on
$ echo 1 > /sys/kernel/debug/tracing/events/i2c/i2c_read/enable
$ cat /sys/kernel/debug/tracing/trace_pipe

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Change-Id: Ic7b36e48828adf4eb2f7714965a4a1df4eb5ac3e

show more ...

5cf0f99230-Jul-2021 Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>

Change fanName to sensorName as this is a sensor

I would appear that HwmonTempSensor.hpp was copied from TachSensor.hpp
clearly we are not a fan but a sensor, this is just a name change.

Tested: it

Change fanName to sensorName as this is a sensor

I would appear that HwmonTempSensor.hpp was copied from TachSensor.hpp
clearly we are not a fan but a sensor, this is just a name change.

Tested: it builds and runs as expeted on Rainier.

Signed-off-by: Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>
Change-Id: Ied4dd8e25ceae56b2f400077ba6205cf07ee0a8e

show more ...

9f6d4fd613-Apr-2021 Jayashree-D <jayashree-d@hcl.com>

IpmbSensor : Add PollRate property.

In existing IpmbSensor code, pollrate value is fixed as 1 sec.

We have OCP YosemiteV2 target which has 4 removable host, each host
has 70(x4) sensors. More numbe

IpmbSensor : Add PollRate property.

In existing IpmbSensor code, pollrate value is fixed as 1 sec.

We have OCP YosemiteV2 target which has 4 removable host, each host
has 70(x4) sensors. More number of sensor will leads to CPU usage.

Also IPMB Version does not require to read the version for every second.

Therefore, pollRate property can be added in the EM file and based on
those values each sensor/version can be read and updated. Hence CPU
utilization also reduces.

CPU load - pollRate is 1 sec.
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
323 1 root R 8200 2% 16% /usr/bin/ipmbsensor

CPU load - pollRate is 5 sec.
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
294 1 root S 8124 2% 6% /usr/bin/ipmbsensor

TESTED: Tested in yosemitev2 by giving different PollRate
to each sensor and verified.

Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Change-Id: I1f80d426699b11a1ac8c33137d12319df429620e

show more ...

a734594928-Apr-2021 Konstantin Aladyshev <aladyshev22@gmail.com>

hwmontemp: respect 'PowerState' parameter

Currently the hwmontemp app still reads sensor data even when the host
is powered off and a sensor has the '"PowerState": "On"' configuration
parameter. Add

hwmontemp: respect 'PowerState' parameter

Currently the hwmontemp app still reads sensor data even when the host
is powered off and a sensor has the '"PowerState": "On"' configuration
parameter. Add a check to the 'setupRead' function to eliminate these
unnecessary read operations.

Tested on the AMD Ethanolx CRB with the SB-TSI sensors.
SB-TSI sensors don't work when the system is in the powered off state.
Moreover, timeout on a value read operation is too long and if the
hwmontemp app is constantly trying to read a sensor value this could
lead to the performance issues.

These commands were used to monitor transactions on the I2C bus:
$ echo 1 > /sys/kernel/debug/tracing/tracing_on
$ echo 1 > /sys/kernel/debug/tracing/events/i2c/i2c_read/enable
$ cat /sys/kernel/debug/tracing/trace_pipe

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Change-Id: I47267a006754222f0a869d86fc77dca228633351

show more ...

323969bc15-Jul-2021 Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>

dbus-sensors: add Pascals to allowlist for units

This adds Pascals allowlist of the units a sensor can measure,
to keep in sync with phosphor-dbus-interfaces/yaml/xyz/openbmc_project \
/Sensor/Value

dbus-sensors: add Pascals to allowlist for units

This adds Pascals allowlist of the units a sensor can measure,
to keep in sync with phosphor-dbus-interfaces/yaml/xyz/openbmc_project \
/Sensor/Value.interface.yaml
This relates to 43729: phosphor-dbus-interfaces: Add enum value Pascals
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces \
/+/43729

Signed-off-by: Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>
Change-Id: I0af0231aca90841032377a88703b51a7f5f96cf3

show more ...

12345678910