History log of /openbmc/intel-ipmi-oem/src/sensorcommands.cpp (Results 1 – 25 of 81)
Revision Date Author Comments
# a021e32b 18-Jun-2024 Johnathan Mantey <johnathanx.mantey@intel.com>

Migrate sensor handling to phosphor-ipmi-host D-Bus

Updates have been applied to phosphor-ipmi-host D-Bus sensors code to
allow removal of virtually all functions in the sensorcommands.cpp
file.

Si

Migrate sensor handling to phosphor-ipmi-host D-Bus

Updates have been applied to phosphor-ipmi-host D-Bus sensors code to
allow removal of virtually all functions in the sensorcommands.cpp
file.

Side by side comparison of the functions that handle SDRs and other
sensor features shows that the code is almost an exact duplicate.

Implementing a sensorcommands_oem linkable module to
phosphor-ipmi-host allows the remaining OEM functionality to be
inserted into the phosphor-ipmi-host shared object.

Tested:
Side by side comparison of the SDR dump
Spot checks of sensor lists
Confirmed SEL data is still sent to /var/log/redfish

Change-Id: I1a15208e38fa77df71a06740d66e6ab359508b80
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...


# 1bcced08 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

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

show more ...


# 87381417 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 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-17 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: I1367c2eabf95f27b5acb08b9e6fd6eedcb77377f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# dcff1506 28-Sep-2022 Vernon Mauery <vernon.mauery@linux.intel.com>

changes needed for meson build

Fix warnings that the meson build turns into errors.

Tested: builds without warnings.

Change-Id: I66b02c4c616f37d09ceba61c494903acc3d28bd5
Signed-off-by: Vernon Maue

changes needed for meson build

Fix warnings that the meson build turns into errors.

Tested: builds without warnings.

Change-Id: I66b02c4c616f37d09ceba61c494903acc3d28bd5
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 84c203d2 21-Jul-2023 Jason M. Bills <jason.m.bills@intel.com>

Return error when SDR offset is out of range

When reading SDRs, if the requested offset is beyond the end of the SDR,
we should return an error indicating that the offset is out of range.

Tested:
C

Return error when SDR offset is out of range

When reading SDRs, if the requested offset is beyond the end of the SDR,
we should return an error indicating that the offset is out of range.

Tested:
Confirmed that reading offset 0x40 or 0x41 of a 64-byte SDR return an
error:
ipmitool raw 0xa 0x23 0x01 0x00 0x87 0x00 0x40 0x1
Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x23 rsp=0xc9): Parameter out of range
ipmitool raw 0xa 0x23 0x01 0x00 0x87 0x00 0x41 0x1
Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x23 rsp=0xc9): Parameter out of range

Change-Id: I3423dddadeb3d2a5e2075ae079d263503ac0679e
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>

show more ...


# b37abfb2 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: I59c0a8c4b89131ecd3e9a841ed37ef3b8dcf8e9d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# ff4982a2 04-Oct-2022 Ed Tanous <edtanous@google.com>

Move the location of sensor object manager

Per phosphor-dbus-interfaces, all sensor implementations should be
implementing an ObjectManager at /xyz/openbmc_project/sensors

This commit updates intel

Move the location of sensor object manager

Per phosphor-dbus-interfaces, all sensor implementations should be
implementing an ObjectManager at /xyz/openbmc_project/sensors

This commit updates intel-ipmi-oem to look from the corrrect location.

Tested:
No good way to test, as I don't have an intel-ipmi-oem platform, but a
similar patch made to phosphor-ipmi-host showed the correct results.

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

show more ...


# 039c3495 09-Sep-2022 Jason M. Bills <jason.m.bills@intel.com>

Change static flat_map to constexpr array of pairs

This changes a hardcoded static flat_map to a compile-time defined
constexpr array of pairs to reduce binary space.

Tested:
Confirmed that 'ipmito

Change static flat_map to constexpr array of pairs

This changes a hardcoded static flat_map to a compile-time defined
constexpr array of pairs to reduce binary space.

Tested:
Confirmed that 'ipmitool sdr elist' shows the correct units

Change-Id: Id66d8c3f7324c39360ccb083fb3b5f3d154ac215
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>

show more ...


# 0748c69d 08-Sep-2022 Jason M. Bills <jason.m.bills@intel.com>

Condense std::variants

Where possible, reduce to a single std::variant type to reduce binary
size.

Change-Id: I73b59765109ce1ccd7339f0e214d1ec3929e1ffc
Signed-off-by: Jason M. Bills <jason.m.bills@

Condense std::variants

Where possible, reduce to a single std::variant type to reduce binary
size.

Change-Id: I73b59765109ce1ccd7339f0e214d1ec3929e1ffc
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>

show more ...


# 9722151c 18-Aug-2022 Paul Fertser <fercerpav@gmail.com>

Specify "8-bit ASCII + Latin 1" SDR encoding

Applications using OpenSolaris libipmi can't handle "Unicode" (type 0)
encoding for the sensor names [0].

This results in issues with VMWare ESXi which

Specify "8-bit ASCII + Latin 1" SDR encoding

Applications using OpenSolaris libipmi can't handle "Unicode" (type 0)
encoding for the sensor names [0].

This results in issues with VMWare ESXi which uses IPMI to fetch sensor
data from the BMC, all the names are shown as "Unspecified 1" (if
default EntityId is used), so status page, SEL entries and the logs
become very confusing.

Fix this by telling it to process all bytes as is by using "8-bit ASCII
+ Latin 1" type.

Tested with VMWare ESXi 7.0 Update 2 and regular ipmitool (using GNU
FreeIPMI), both shows names correctly.

[0] https://github.com/kofemann/opensolaris/blob/master/usr/src/lib/libipmi/common/ipmi_util.c#L258

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

show more ...


# f944d2e5 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: Ie7375047bd567aa052d3bd35a6dd7008779a05b4

show more ...


# 41a6e9f3 23-May-2022 Zhikui Ren <zhikui.ren@intel.com>

sensorcommands: handle NaN in threshold interface

dbus-sensor threshold has been changed to always create high and low
interfaces. Threshold value is set to NaN when there is no actual limit.

When

sensorcommands: handle NaN in threshold interface

dbus-sensor threshold has been changed to always create high and low
interfaces. Threshold value is set to NaN when there is no actual limit.

When creating threshold attributes in SDR, verify that sensor threshold
value is not NaN.

When getting min and max from threshold interfaces, use std::fmin and
std::fmax instead of std::min and std::max. If one of the two arguments
is NaN, the value of the other argument is returned. Since sensors are
always created with default min/max values, the other argument is not
going to be NaN.

Tested:
ipmitool sensor list returns without error.
Sensor limit is na when threshold interface value is NaN.

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

show more ...


# ce3b7577 14-Apr-2022 Vernon Mauery <vernon.mauery@linux.intel.com>

Fix incorrect generatorID shifting

generatorID is an address or a software ID in the upper seven bits
followed by bit-0 of a 1 (for software ID) or a 0 for address. This
means that the address is ef

Fix incorrect generatorID shifting

generatorID is an address or a software ID in the upper seven bits
followed by bit-0 of a 1 (for software ID) or a 0 for address. This
means that the address is effectively an 8-bit address, if bit-0 is 0.

This change removes the right shifting to fix comparisons to 8-bit
addresses done in the code.

Change-Id: Ia386596ad1ce7f15ef4dca446b5c4fc778dbb8e8
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 5d24dda2 13-Apr-2022 Vernon Mauery <vernon.mauery@linux.intel.com>

do not shift kcs-passed software ID

When the software ID is passed in over KCS, the LSBit is required to be
set and the software ID is already in the correct format to be used as
the generatorID for

do not shift kcs-passed software ID

When the software ID is passed in over KCS, the LSBit is required to be
set and the software ID is already in the correct format to be used as
the generatorID for SEL data.

Change-Id: Ic19b55fd8f686584524fc9c0348b43d63956f292
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 9e58cfe1 01-Nov-2021 Sujoy Ray <sujoy.ray@intel.com>

SEL log Generator ID should Conform to IPMI Spec

In IMPI specification, the generator ID for SEL log is 2 bytes long.
Apart from the Generator ID, it contains LUN and channel information.
The fix is

SEL log Generator ID should Conform to IPMI Spec

In IMPI specification, the generator ID for SEL log is 2 bytes long.
Apart from the Generator ID, it contains LUN and channel information.
The fix is to change 1-Byte Generator ID to 2-byte generator ID and
include all missing information into it.

Tested
Following tests were executed:
1) Run ipmitool raw -l 1 0x4 0x2 0x4 0x8 0x1 0x6 0x1 0x5
This ensures that non-zero LUN information is included
in the SEL record.

2) Instrument the code to look like ME has created an event
and make sure that logs are saved properly.

For 1) and 2) logs are read from the WebUI to make sure that
they are being saved as expected.

Signed-off-by: Sujoy Ray <sujoy.ray@intel.com>
Change-Id: I78d4423cc24c941af7bf0cd70423a95747ba4a76

show more ...


# bd51e6a9 06-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

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


# d4b74b4f 08-Oct-2021 sureshvijayv1 <suresh.vijayakumar@intel.com>

Fix for SDR Repository Info command returning off-by-one SDR Count

NM Discovery SDR is not added to record count during the time of
record count manipulation in the command.

Tested:
Issued 'ipmitoo

Fix for SDR Repository Info command returning off-by-one SDR Count

NM Discovery SDR is not added to record count during the time of
record count manipulation in the command.

Tested:
Issued 'ipmitool sdr dump /tmp/xxxx.bin'
Performed a hex dump on the binary data and reviewed the SDR with
record type 0xC0.

Issued 'ipmitool sdr info'
Observed that the SDR record count returns correctly as per the
number of SDR records including NM Discovery SDR count in it.

Change-Id: Ic91985ff8f6051db5d799c250b6cfb079cb33fba
Signed-off-by: sureshvijayv1 <suresh.vijayakumar@intel.com>

show more ...


# 3c7ec2d0 22-Sep-2021 Adrian Ambrożewicz <adrian.ambrozewicz@intel.com>

Fix assigning Generator ID for IPMB path

Per IPMI spec - Generator ID is defined as follows for I2C sender:
[7-1] = I2C Slave Address
[0] = 0 (indicates IPMB Slave Address)

This change is introduci

Fix assigning Generator ID for IPMB path

Per IPMI spec - Generator ID is defined as follows for I2C sender:
[7-1] = I2C Slave Address
[0] = 0 (indicates IPMB Slave Address)

This change is introducing proper shift for IPMB path, so Generator ID
is correctly assigned.

Tested:
- tested on actual system with IPMB events originating from ME,
- after this change SEL entries from ME have correct generator ID (0x2C).

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

show more ...


# 2346b5d2 06-Aug-2021 Johnathan Mantey <johnathanx.mantey@intel.com>

Improve SDR sensor number mapping for sensor nums above 510

The recent submission to support SDR records defining Type 01 records
for sensors did not work when the system had more than 510 sensors.

Improve SDR sensor number mapping for sensor nums above 510

The recent submission to support SDR records defining Type 01 records
for sensors did not work when the system had more than 510 sensors. A
recent change supplied a system that enumerated more sensors then IPMI
can support. The change highlighted an error in how the Type 01
records were built.

This commit handles systems with a larger set of sensors. The code for
handling SDR # 511 correctly creates sensor number 768. It then fills
sensors to the limit of LUN 3.

Tested:
A SUT that supplied 1946 sensors was used to implement and test the
code.
Test cases:
"ipmitool sdr elist" returns 765 sensors
"ipmitool sensor list" returns 765 sensors
"ipmitool -l <lun> raw 4 0x2d <sn>" performed the correct behavior for
luns 0-3, sensor numbers 0, 254, 255.

Change-Id: I8e5160c93e79a366b897554efdd60e2edcd3594a
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...


# b485b1e6 28-Jul-2021 Johnathan Mantey <johnathanx.mantey@intel.com>

Make sensor/sdr list commands work on systems with > 255 sensors

The "ipmitool sdr elist" and "ipmitool sensor list" commands failed to
operate correctly on systems that contain more than 255 sensor

Make sensor/sdr list commands work on systems with > 255 sensors

The "ipmitool sdr elist" and "ipmitool sensor list" commands failed to
operate correctly on systems that contain more than 255 sensors. A
change made in the past assigned up to 255 sensors to LUN 0, 1, and
3. The code for iterating the SDR's did not get updated at the same
time. The SDR record number acted as the sensor number. This
incompatibility caused error response codes to be returned when sensor
number 255 (which is reserved) was accessed.

The change in this commit modifies the SDR access code to prevent
using the reserved sensor number. SDR records are still assigned in
order. The sensor number associated with the SDR are assigned to avoid
the reserved value, and in the same manner as code previously
submitted and merged.

Tested:
Installed the modified code on a SUT that enumerates more than 256
sensors.
Issued "ipmitool sensor list" and confirmed all sensors were
displayed. The "Get SDR 00ff command failed: Invalid data field in
request" error message was not displayed.
Issued "ipmitool sdr elist" and confirmed all sensors were
displayed. The "Get SDR 00ff command failed: Invalid data field in
request" error message was not displayed.
Confirmed the sensor number/LUN guard code was not activated.

Change-Id: I194a3116fdf255527a8c5036ee71b8b478c9b275
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>

show more ...


# 989a13b4 20-Jun-2021 Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>

sensorcommands:Platform Event Message command corrected

Add support to check the incoming channel type and update the
generatorID based on requester slave address.

Add support to check for valid ev

sensorcommands:Platform Event Message command corrected

Add support to check the incoming channel type and update the
generatorID based on requester slave address.

Add support to check for valid evmRev and Sensor Type.

Tested:
Command: ipmitool -I lanplus -H <BMC_IP> -U root -P 0penBmc raw 0x04
0x02 0x04 0x6a 0xcd 0xf6 0x6b 0xed 0x0f
Response: Unable to send RAW command (channel=0x0 netfn=0x4 lun=0x0
cmd=0x2 rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC_IP> -U root -P 0penBmc raw 0x04
0x02 0x54 0x6a 0xcd 0xf6 0x6b 0xed 0x0f
Response: Unable to send RAW command (channel=0x0 netfn=0x4 lun=0x0
cmd=0x2 rsp=0xcc): Invalid data field in request

Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: Ibb93d09777f5a7c515d45a4aa910c657d503d9ce

show more ...


# 339fc565 13-Jun-2021 Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>

sensorcommands: check for reserved sensor number in sensor commands.

Add support to check for reserved sensor number (0xFF) in sensor
commands.

Tested:
Command: Set Sensor Threshold
ipmitool raw 0x

sensorcommands: check for reserved sensor number in sensor commands.

Add support to check for reserved sensor number (0xFF) in sensor
commands.

Tested:
Command: Set Sensor Threshold
ipmitool raw 0x04 0x26 0xff 0x00 0x3a 0xab 0x03 0x02 0xef 0x63
Response: Unable to send RAW command (channel=0x0 netfn=0x4 lun=0x0
cmd=0x26 rsp=0xcc): Invalid data field in request

Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: Id99f5ef1515263ac3dbf2edec7f94b0b4badb4e3

show more ...


# 06aa21ab 28-Oct-2020 Josh Lehan <krellan@google.com>

sensorcommands: Add IPMI reading logging instrumentation

Noteworthy sensor readings, such as the first reading,
a new minimum or maximum value, or ending a good or
bad streak of readings, will now h

sensorcommands: Add IPMI reading logging instrumentation

Noteworthy sensor readings, such as the first reading,
a new minimum or maximum value, or ending a good or
bad streak of readings, will now have some useful logging output.

Tested: Example logs
```
root@bmc:~# journalctl --no-pager | grep 'IPMI sensor'
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor0: First reading, value=6 byte=51
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor0: Range min=0 max=30, Coefficients mValue=118 rExp=-3 bValue=0 bExp=0 bSigned=0
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor1: First reading, value=7 byte=59
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor1: Range min=0 max=30, Coefficients mValue=118 rExp=-3 bValue=0 bExp=0 bSigned=0
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor2: First reading, value=1.437 byte=12
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor2: Range min=0 max=30, Coefficients mValue=118 rExp=-3 bValue=0 bExp=0 bSigned=0
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor3: First reading, value=1.437 byte=12
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor3: Range min=0 max=30, Coefficients mValue=118 rExp=-3 bValue=0 bExp=0 bSigned=0
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor4: First reading, value=1.96 byte=17
Jan 01 00:03:16 bmc ipmid[2865]: IPMI sensor sensor4: Range min=0 max=30, Coefficients mValue=118 rExp=-3 bValue=0 bExp=0 bSigned=0
...
```
Machine and sensors names are replaced.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Idf7c8d4285b286fdc0afb3f0e7260c2d4915b326
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 17eadbfb 06-Feb-2021 Kuiying Wang <kuiying.wang@intel.com>

Fix sensor missing issue.

There is issue for "BMC randomly unable to get sensor readings".
When invoking "ipmitool sdr" from Linux OS (host), it only
returns three sensors like following partial rec

Fix sensor missing issue.

There is issue for "BMC randomly unable to get sensor readings".
When invoking "ipmitool sdr" from Linux OS (host), it only
returns three sensors like following partial records:
[root@localhost ~]# ipmitool sdr
CPU Power | 0 Watts | ok
Memory Power | 0 Watts | ok
Total Power | 0 Watts | ok
[root@localhost ~]#

There 2 caches sensorTree and sensorDataRecords.
When sensorDataRecords cache and sensorTree cache is not sync,
which causes this issue, like sensorTree cache has 10 sensors
but there are just 5 sensors in sensorDataRecords cache.
Most important sensorDataRecords cache is not necessary,
ipmiStorageGetSDR could get data from dbus directly and
no any performance impact.

Using sensorMapUpdatePeriod(10s) but not sensorMapSdrUpdatePeriod(60s),
60 seconds are too long to answer user with some SDR content
at the first time of BMC bootup.

Tested:
All sensors could be listed even at booting phase.
Could print correct sensor set along with the boot progress.

root@intel-obmc:~# ipmitool sdr
CPU Power | 202 Watts | ok
Memory Power | 0 Watts | ok
Total Power | 312 Watts | ok
root@intel-obmc:~# ipmitool sdr
System Airflow | 14 unspecified | ok
PSU1 In Current | 1.18 Amps | ok
PSU1 Out Current | 20.80 Amps | ok
PSU2 In Current | 0 Amps | ok
PSU2 Out Current | no reading | ns
Pwm 1 | 29.79 unspecifi | ok
Pwm 2 | 29.79 unspecifi | ok
Pwm 3 | 29.79 unspecifi | ok
Pwm 4 | 29.79 unspecifi | ok
Pwm 5 | 29.79 unspecifi | ok
Pwm 6 | 29.79 unspecifi | ok
Pwm 13 | 29.79 unspecifi | ok
Pwm 14 | 29.79 unspecifi | ok
Pwm 15 | 29.79 unspecifi | ok
Pwm 16 | 29.79 unspecifi | ok
Pwm PSU1 Fan 1 | 39.98 unspecifi | ok
Pwm PSU1 Fan 2 | 39.98 unspecifi | ok
.............
PVCCD HV CPU1 | 1.18 Volts | ok
PVCCFA EHV FIVRA | 1.16 Volts | ok
PVCCINFAON CPU1 | 1.11 Volts | ok
PVCCIN CPU1 | 1.68 Volts | ok
PVNN PCH AUX | 1.03 Volts | ok
root@intel-obmc:~#

Change-Id: I729d9bcbf91f0e96c62fb5f5ebe0240a0eaa47df
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
Signed-off-by: Helen Huang <he.huang@linux.intel.com>
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>

show more ...


# 09701efa 15-Jul-2020 Alex Qiu <xqiu@google.com>

sensorcommands: Cache sensor data at 60s interval when requested for SDR

Temporary tuning to mitigate performance issue due to inconsistent dbus
call performance in getSensorMap().

Moving the senso

sensorcommands: Cache sensor data at 60s interval when requested for SDR

Temporary tuning to mitigate performance issue due to inconsistent dbus
call performance in getSensorMap().

Moving the sensor update time to after finish building the map allow the
data to be cached for the the build time plus sensorMapUpdatePeriod.

A SDR scan is observed to take about half a minute, and SDR is scanned
for 17 times during host boot, which adds minutes to host
boot time. However, sensor reading is seldom invoked during boot, and
the host does not poll for SDR after the first one.
Based on these facts, deploy a trick that turn up cache time to 60
seconds to reduce dbus traffic when SDR is requested, while the sensor
reading update interval is not affected.
No time reduction to `ipmitool sdr` command, because it polls for
both SDR and sensor reading.

Tested:
After issuing host reboot command in BMC, host boot time recorded is
reduced from 14:40 to 11:02.
The fan sensor is still observed to be updated every 2 seconds.

Signed-off-by: Alex Qiu <xqiu@google.com>
Change-Id: If45f5b850854ff5888909636507d1c47840d17b6
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


1234