History log of /openbmc/dbus-sensors/src/ (Results 301 – 325 of 616)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
a040ec4006-Oct-2021 krishnar4 <krishnar@ami.com>

ADCSensor: Changed error log

If adc sensor not available in system , Log in journal as
"No adc sensor in system" instead of "No temperature sensor in system".

Signed-off-by: krishnar4 <krishnar@ami

ADCSensor: Changed error log

If adc sensor not available in system , Log in journal as
"No adc sensor in system" instead of "No temperature sensor in system".

Signed-off-by: krishnar4 <krishnar@ami.com>
Change-Id: I6e41ed61d8d927182ccac9fcd02cf462b422b8d2

show more ...

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

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

nvmesensor: Introduce nvme-mi-mctp build feature

Allow MCTP support to be configured at build time.

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

nvmesensor: Introduce nvme-mi-mctp build feature

Allow MCTP support to be configured at build time.

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

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

33703af708-Sep-2021 Lotus Xu <xuxiaohan@bytedance.com>

psusensor: Add xdpe12284 support

Tested: Combined with related driver and entity-manager changes from
https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/46969
sensors properly show up in

psusensor: Add xdpe12284 support

Tested: Combined with related driver and entity-manager changes from
https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/46969
sensors properly show up in IPMI sensors

Signed-off-by: Lotus Xu <xuxiaohan@bytedance.com>
Change-Id: I0bafa99e6507d8b84af2b5521112ac0670e0cc82

show more ...

20bf2c1c14-Sep-2021 Matt Spinler <spinler@us.ibm.com>

HwmonTempSensor: Watch for InterfacesRemoved

In the current code, if a temperature sensor is on a removable card and
that card is removed, hwmontempsensor does not know it has been removed
and will

HwmonTempSensor: Watch for InterfacesRemoved

In the current code, if a temperature sensor is on a removable card and
that card is removed, hwmontempsensor does not know it has been removed
and will keep on trying to read the sensor, resulting in it reporting
the sensor is in error state (Value = NaN and
OperationalStatus.Functional = false). This isn't ideal because a) The
device isn't in the system so why have a sensor for it and b) This error
reading implies there is something wrong when there isn't.

This commit adds support to remove the sensor from D-Bus when its entity
manager configuration interface has been removed from D-Bus, which
entity-manager will do when a currently passing probe statement no
longer passes. This could happen, for example, when the EEPROM D-Bus
property it was matching on is removed from D-Bus by the daemon that
keeps EEPROM contents on D-Bus when it detects the EEPROM is no longer
there.

Tested: The D-Bus sensor lifetime matches the entity-manager
configuration object lifetime.

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

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

5770a6fd07-Sep-2021 Oskar Senft <osk@google.com>

HwmonTempSensor: Add NCT7802 as a valid type.

The TYAN S7106 mainboard uses an NCT7802 hardware monitoring IC to
measure various temperatures on the board. Adding this supported
type to allow correc

HwmonTempSensor: Add NCT7802 as a valid type.

The TYAN S7106 mainboard uses an NCT7802 hardware monitoring IC to
measure various temperatures on the board. Adding this supported
type to allow correct references from EntityManager.

Signed-off-by: Oskar Senft <osk@google.com>
Change-Id: I8151068a0f740d8751af76b217a3ef458bd2e2ca

show more ...

302a61a527-Aug-2021 Patrick Williams <patrick@stwcx.xyz>

build: DRY dependencies

Nearly everything uses 'sdbusplus' and 'nlohmann-json'. Since
'nlohmann-json' is a header-only library there is no issue with
excessively including it as a dependency. DRY

build: DRY dependencies

Nearly everything uses 'sdbusplus' and 'nlohmann-json'. Since
'nlohmann-json' is a header-only library there is no issue with
excessively including it as a dependency. DRY up the dependency
specification by creating a 'default_deps' array that can contain
these.

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

show more ...

8b8f606f27-Aug-2021 Patrick Williams <patrick@stwcx.xyz>

build: use nlohmann-json dependency

Many sources files want to use the 'json.hpp' file from nlohmann,
but when this is installed as a subproject it isn't in the default
search path, unless a depende

build: use nlohmann-json dependency

Many sources files want to use the 'json.hpp' file from nlohmann,
but when this is installed as a subproject it isn't in the default
search path, unless a dependency to it is explicitly added. In
most cases this is pulled in via the 'Thresholds.hpp' file which is
in-turn linked in by the thresholds static library.

In meson, static libraries shouldn't be linked against directly but
instead indirectly through a 'dependency' relationship, otherwise the
implicit header file needs are not able to be communicated up to users
of the library (such as Thresholds -> json.hpp here). Revamp the
static library relationships to use 'dependencies' rather than
'link_with' so that the header file needs are properly expressed.

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

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

d653b75c23-Aug-2021 Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>

Corrects bug in using boost::container erase()

Shawn pointed out an existing bug using boost::container erase()
described here: https://gerrit.openbmc-project.xyz/c/openbmc/\
dbus-sensors/+/43410/70

Corrects bug in using boost::container erase()

Shawn pointed out an existing bug using boost::container erase()
described here: https://gerrit.openbmc-project.xyz/c/openbmc/\
dbus-sensors/+/43410/70..74/src/IIOMain.cpp#196 This fixes that bug.

Tested: on Everest's Storm King Op Panels with busctl introspect \
--no-pager xyz.openbmc_project.HwmonTempSensor /xyz/openbmc_project/\
sensors/temperature/Ambient_0_Temp Results functioning properly and
consistent with location of the systems.

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

show more ...

f1ace50b02-Aug-2021 Avenash Asai Thambi <avenash.thambi@fii-usa.com>

PSUSensorMain.cpp: Add support for ADM1266 device.

Tested:
- Combined with related driver and entity-manager changes from
https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/40860,
sensor

PSUSensorMain.cpp: Add support for ADM1266 device.

Tested:
- Combined with related driver and entity-manager changes from
https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/40860,
sensors properly show up in IPMI sensors.

Signed-off-by: Avenash Asai Thambi <avenash.thambi@fii-usa.com>
Change-Id: Ide4c90027a1ef8b5df4adeeb8450ccce3da29dd7

show more ...

e5fc3a5510-Aug-2021 Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com>

Compute IIO reading from raw with offset and scale

For IIO RAW sensors we get a raw_value, an offset, and scale to
compute the value = (raw_value + offset) * scale, thus scale changes
from a divisor

Compute IIO reading from raw with offset and scale

For IIO RAW sensors we get a raw_value, an offset, and scale to
compute the value = (raw_value + offset) * scale, thus scale changes
from a divisor to a multiplier.

Tested: on Rainier and Everest the sensors function the same before
and after this commit is applied.

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

show more ...

e5b867b026-Jul-2021 Basheer Ahmed Muddebihal <basheerx.muddebihal@intel.com>

Fix for airflow sensor interface path

Corrected the airflow sensor dbus interface path to airflow from cfm.
Reference of airflow interface description
https://github.com/openbmc/phosphor-dbus-interf

Fix for airflow sensor interface path

Corrected the airflow sensor dbus interface path to airflow from cfm.
Reference of airflow interface description
https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz
/openbmc_project/Sensor/Value.interface.yaml

Tested:
ipmitool sdr elist - shows the System Airflow sensor
busctl tree xyz.openbmc_project.ExitAirTempSensor
busctl introspect xyz.openbmc_project.ExitAirTempSensor
/xyz/openbmc_project/sensors/airflow/System_Airflow

Signed-off-by: Basheer Ahmed Muddebihal <basheerx.muddebihal@intel.com>
Change-Id: I8d596d388374b4f8cc1354d05e795781093d076c

show more ...

913d4d0021-Jul-2021 Bruce Lee <Bruce_Lee@quantatw.com>

Add setupManufacturingModeMatch

Missed adding setupManufacturingModeMatch function in ExitAirTempSensor.cpp

Issues from: https://github.com/openbmc/dbus-sensors/issues/14

Signed-off-by: Bruce Lee

Add setupManufacturingModeMatch

Missed adding setupManufacturingModeMatch function in ExitAirTempSensor.cpp

Issues from: https://github.com/openbmc/dbus-sensors/issues/14

Signed-off-by: Bruce Lee <Bruce_Lee@quantatw.com>
Change-Id: I61ce16342aa0321972f74f705d94f5eb688e40dc

show more ...

3453354b20-Jul-2021 Paul Fertser <fercerpav@gmail.com>

PSUSensor: improve error logging

PSU sub-events might be asserted by to different alarm flags as returned
by the kernel so when debugging a hardware or driver issue it's
important to know what condi

PSUSensor: improve error logging

PSU sub-events might be asserted by to different alarm flags as returned
by the kernel so when debugging a hardware or driver issue it's
important to know what condition exactly triggered.

Same about errors reading data from PMBUS sensors, for debugging it's
essential to learn precisely what happened.

Example output:

System error 11 (Resource temporarily unavailable) reading from /sys/class/hwmon/hwmon12/temp1_input, line: 199
PSUSubEvent asserted by /sys/class/hwmon/hwmon10/curr3_crit_alarm
PSUSubEvent asserted by /sys/class/hwmon/hwmon12/curr3_crit_alarm
System error 6 (No such device or address) reading from /sys/class/hwmon/hwmon8/curr3_input, line: 199
PSUSubEvent asserted by /sys/class/hwmon/hwmon15/curr3_crit_alarm

Monitoring with strace confirms psusensor happily continues to read from
the file descriptors in question after the glitches.

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

show more ...

585d3a0720-Jul-2021 Thu Ba Nguyen <tbnguyen@amperecomputing.com>

dbus-sensors: Change the host state match string

When the CurrentHostState dbus property value ends with "Running",
Dbus-sensors marks the host as running and starts reading the sensors
with "PowerS

dbus-sensors: Change the host state match string

When the CurrentHostState dbus property value ends with "Running",
Dbus-sensors marks the host as running and starts reading the sensors
with "PowerState=On" configuration.
From commit "host state transitioning ...", phosphor-state-manager
package updates the transition state "TransitioningToOff" or
"TransitioningToRunning" to CurrentHostState property. This causes
dbus-sensors detects the host is running when it is transiting to
running state.
This commit fixs that issue by changing the match string from
"Running" to ".Running".

Tested:
1. Power off the host.
2. Power on the host.
3. Make sure there is no threshold warnings/errors for
the sensors with "PowerState=On" configuration.

Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com>
Change-Id: I3bde0f3d288614657869f54e286a2d690d92dcad

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

e41d52ff07-Apr-2021 Jeff Lin <JeffLin2@quantatw.com>

PSUSensor: Add Offset attribute

The value of "Offset" is measured by power team and is considered as the
correctest calibration value for making the sensor reading value much
more precise on the pla

PSUSensor: Add Offset attribute

The value of "Offset" is measured by power team and is considered as the
correctest calibration value for making the sensor reading value much
more precise on the platform.

Add the customizable attribute "Offset" to be able to adjust the raw
data and than update to the "Value" property on dbus.

Tested: Add the following configuration to entity-manager
{
"Address": "0x68",
"Bus": "32",
"Labels": [
"vout1",
"iout1",
"pout1",
"temp1"
],
"Name": "onboard_p12v",
"Thresholds": [
...
],
"Type": "RAA228000",
"iout1_Max": 108.0,
"iout1_Offset": -0.25,
"pout1_Max": 900.0,
"pout1_Offset": -5.0,
"vout1_Max": 13.0
},
- Check the reading value on dbus of this sensor is equal to the
value we expected.

Signed-off-by: Jeff Lin <JeffLin2@quantatw.com>
Change-Id: Ia741c668e1d1939d2366f2b02553a465cd3c616b

show more ...

7170a23504-Feb-2021 Lei YU <yulei.sh@bytedance.com>

psusensor: Use configurable read interval

The intervals to read the psusensor value and event were hard-coded to
1000 ms.

For some sensors user may need to use a different interval to poll, e.g.
it

psusensor: Use configurable read interval

The intervals to read the psusensor value and event were hard-coded to
1000 ms.

For some sensors user may need to use a different interval to poll, e.g.
it should not poll the voltage of RTC battery because it drains the
battery.
The ADC sensor already has the similar change.

Make them configurable parameters from entity-manager's json, so that
the user could use customized poll rate to poll the specific sensors.
If the "PollRate" is not set in the json config, the behavior is the
same as before that uses the default 1s poll rate.

The config parameters are the same as HwmonTemp and ADC sensor.

E.g. the below json config changes the poll rate to 2.0s for pmbus sensor
at i2c 5-0076.

{
"Address": "0x76",
"Bus": 5,
"Name": "CPU0_VR_0",
"Labels": [
"pin",
"temp1",
"vout1"
],
"PollRate": 2.0,
"Thresholds": [...],
"Type": "pmbus"
}

Tested: Add `PollRate` in pmbus's sensor and verify the related sensors'
poll rate is changed accordingly.

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

show more ...

e76a5a6d09-Jul-2021 Zhikui Ren <zhikui.ren@intel.com>

fix klocwork issues: Add return 0 for int main()

main in IpmbSensor.cpp was missed last time.
Add it now to resolve Klocwork issue.

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

fix klocwork issues: Add return 0 for int main()

main in IpmbSensor.cpp was missed last time.
Add it now to resolve Klocwork issue.

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

show more ...

1...<<11121314151617181920>>...25