ce982777 | 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.
Ported From: https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/45384
Change-Id: I194a3116fdf255527a8c5036ee71b8b478c9b275 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
6f43f4a1 | 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
Ported From: https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/44255
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> Change-Id: Ibb93d09777f5a7c515d45a4aa910c657d503d9ce Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
8c2f3c4a | 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
Ported From: https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/44032
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> Change-Id: Id99f5ef1515263ac3dbf2edec7f94b0b4badb4e3 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
d950f410 | 20-Oct-2021 |
JeffLin <JeffLin2@quantatw.com> |
dbus-sdr: Remove suffixs appended by dbus-sensors
psusensor in dbus-sensors will append some suffixs in objectpath and make the name easily exceeds 16 bytes.
This patch remove the suffix according
dbus-sdr: Remove suffixs appended by dbus-sensors
psusensor in dbus-sensors will append some suffixs in objectpath and make the name easily exceeds 16 bytes.
This patch remove the suffix according to the appending rule in psusensor.
See https://github.com/openbmc/intel-ipmi-oem/issues/4 for details.
Tested:
cpu0 pvccinfaon | 17.224 | Amps | ok | na | -5.176 | na | na | 51.048 | na cpu1 pvccinfaon | 16.552 | Amps | ok | na | -5.176 | na | na | 51.048 | na cpu0 pvccinfaon | 23.884 | Watts | ok | na | -9.864 | na | na | 57.060 | na cpu1 pvccinfaon | 23.026 | Watts | ok | na | -9.864 | na | na | 57.060 | na cpu0 pvccinfaon | 45.000 | degrees C | ok | na | 0.000 | 3.000 | 90.000 | 95.000 | na cpu1 pvccinfaon | 44.000 | degrees C | ok | na | 0.000 | 3.000 | 90.000 | 95.000 | na cpu0 pvccinfaon | 1.014 | Volts | ok | na | 0.858 | na | na | 1.131 | na cpu1 pvccinfaon | 1.014 | Volts | ok | na | 0.858 | na | na | 1.131 | na │ ├─/xyz/openbmc_project/State/Decorator/cpu0_pvccinfaon_OperationalStatus │ ├─/xyz/openbmc_project/State/Decorator/cpu1_pvccinfaon_OperationalStatus │ ├─/xyz/openbmc_project/sensors/current/cpu0_pvccinfaon_Output_Current │ ├─/xyz/openbmc_project/sensors/current/cpu1_pvccinfaon_Output_Current │ ├─/xyz/openbmc_project/sensors/power/cpu0_pvccinfaon_Output_Power │ ├─/xyz/openbmc_project/sensors/power/cpu1_pvccinfaon_Output_Power │ ├─/xyz/openbmc_project/sensors/temperature/cpu0_pvccinfaon_Temperature │ ├─/xyz/openbmc_project/sensors/temperature/cpu1_pvccinfaon_Temperature ├─/xyz/openbmc_project/sensors/voltage/cpu0_pvccinfaon_Output_Voltage ├─/xyz/openbmc_project/sensors/voltage/cpu1_pvccinfaon_Output_Voltage
Signed-off-by: JeffLin <JeffLin2@quantatw.com> Change-Id: I66620e6b6cd7088a848b79ea625c9cefa63f2053
show more ...
|
d2ee9867 | 18-Oct-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: Remove the use of undocumented Inventory.Decorator.FruDevice
Remove the use of Inventory.Decorator.FruDevice interface and use Inventory.Decorator.I2CDevice instead.
https://github.com/op
dbus-sdr: Remove the use of undocumented Inventory.Decorator.FruDevice
Remove the use of Inventory.Decorator.FruDevice interface and use Inventory.Decorator.I2CDevice instead.
https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory/Decorator/I2CDevice.interface.yaml
The two interface serve the same purpose.
Change-Id: I6c7afd3686c06e611b6e606cfd82d8dafcd65509 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
d351a729 | 12-Aug-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: prevent handler registration if dbus-sdr is enabled
Compile out the handler registration if it is using dynamic stack. Reorder the handlers to have common handlers between the two implemen
dbus-sdr: prevent handler registration if dbus-sdr is enabled
Compile out the handler registration if it is using dynamic stack. Reorder the handlers to have common handlers between the two implementations alway registered.
Managing the handlers like this all code to be compiled during CI while providing some control over the handlers used.
Change-Id: I6e9cffacfac4127d2307e8c5e548c84323742c94 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
f0a89946 | 29-Jul-2021 |
Jie Yang <jjy@google.com> |
dbus-sdr: Add sensor mutability
Sensor ValueMutability interface has already been merged into openbmc/phosphor-dbus-interfaces here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interf
dbus-sdr: Add sensor mutability
Sensor ValueMutability interface has already been merged into openbmc/phosphor-dbus-interfaces here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/36333
This change adds the IPMI server-side changes, namely, the test for the "Mutable" member of this interface existing and being "true". If so, it grants external write permission to this sensor, otherwise, it will remain read-only (which is the default).
It replaces a previous compile-time constant that could only be changed at compilation time, and would affect all sensors globally, neither of which was desirable.
This "Mutable" interface boolean can be used to grant write permission to sensors, such as external sensors and fan PWM sensors in manual mode. IPMI setting sensor reading will check the mutability first.
It achieves feature parity with the old "mutability: Mutability::Write|Mutability::Read" settings, in the old hardcoded YAML configuration files.
Also see the dbus-sensors changes, namely, the reading of this parameter from entity-manager configuration, and setting this D-Bus property accordingly, if "Mutable" is true: https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/45405
Tested: With both 45405 and 45407 changes in, this feature has been working nicely in our local environment for some time now.
Signed-off-by: Jie Yang <jjy@google.com> Change-Id: I4ecff1a0424c0bc23d3a90466e1bb4b655f07859 Signed-off-by: Josh Lehan <krellan@google.com>
show more ...
|
9388972d | 13-Oct-2021 |
Shakeeb Pasha <shakeebbk@gmail.com> |
Handle missing MinValue/MaxValue
In the existing implementation, if MinValue/MaxValue property is missing on dbus and if one of the warning or critical thresholds are set, then the readings are scal
Handle missing MinValue/MaxValue
In the existing implementation, if MinValue/MaxValue property is missing on dbus and if one of the warning or critical thresholds are set, then the readings are scaled differently in `ipmiSenGetSensorReading` than the values reported for sensor attributes(B, M, bExp, rExp) in `ipmiStorageGetSDR`.
Signed-off-by: Shakeeb Pasha <shakeebbk@gmail.com> Change-Id: I9cd10224985874d8e200b6dcfaf0e9394575d9d9
show more ...
|
eacad3c4 | 28-Jun-2021 |
Shakeeb Pasha <shakeebbk@gmail.com> |
Support for FRU name from entity manager config
Get the FRU name as published on dbus by entity manager config if the entity manager fru decorator has a name specified. This takes care of existing a
Support for FRU name from entity manager config
Get the FRU name as published on dbus by entity manager config if the entity manager fru decorator has a name specified. This takes care of existing approach of picking names from board/product name with following config, as well as option to specify custom names. ``` "xyz.openbmc_project.Inventory.Decorator.FruDevice": { "Bus": "$bus", "Address": "$address", "Name": "$PRODUCT_PRODUCT_NAME" }, ```
Change-Id: I5c772721f343e1a87d7a32bd149402aaa26e23e2 Signed-off-by: Shakeeb Pasha <shakeebbk@gmail.com>
show more ...
|
bf47a916 | 21-May-2021 |
Zev Weiss <zev@bewilderbeest.net> |
dbus-sdr: allow retrieving FRU ID zero
The getFru() function had been unconditionally translating attempts to access FRU ID 0 to instead access FRU ID 1, making it impossible to retrieve baseboard F
dbus-sdr: allow retrieving FRU ID zero
The getFru() function had been unconditionally translating attempts to access FRU ID 0 to instead access FRU ID 1, making it impossible to retrieve baseboard FRU information via IPMI:
$ ipmitool -C17 -I lanplus -U root -P 0penBmc -H $bmc fru print 0 Device not present (Requested sensor, data, or record not found)
By removing this substitution, IPMI clients can now access baseboard FRU info.
Tested: 'ipmitool fru print 0' displays the expected baseboard FRU data.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I87b8c299f7bbf4f10bac25484e03cb6df97241a6
show more ...
|
f38f9d1b | 21-May-2021 |
Zev Weiss <zev@bewilderbeest.net> |
dbus-sdr: treat FRUs with a chassis type of "Main Server" as baseboards
Previously this had been restricted to "rack mount" only; the ASRock Rack E3C246D4I board's FRU EEPROM has it marked as a "mai
dbus-sdr: treat FRUs with a chassis type of "Main Server" as baseboards
Previously this had been restricted to "rack mount" only; the ASRock Rack E3C246D4I board's FRU EEPROM has it marked as a "main server", however, so this lets that FRU data get used for FRU ID zero (baseboard info).
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Iff59b30afcc9fbe1cde15358adfabd37152acd1d
show more ...
|
f61c0865 | 14-Sep-2021 |
Harvey Wu <Harvey.Wu@quantatw.com> |
dbus-sdr: fix if condition bug when enable dynamic_sensors_write
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: I54acd07f3fa273ae9c3b582b87f20dfd3cc1814e |
a2ad2da8 | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic2b49715c7b81ac5bcfc12ff2d3b4c593cd95ce7 |
ef1259be | 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3b5d83511afdf17b2911502279087e57a59b9945
show more ...
|
530e2776 | 02-Jul-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: set settable state to true if sensor write is enabled
Set the settable state for the sensors to true if `FEATURE_DYNAMIC_SENSORS_WRITE` is enabled. This will help indicate that the sensors
dbus-sdr: set settable state to true if sensor write is enabled
Set the settable state for the sensors to true if `FEATURE_DYNAMIC_SENSORS_WRITE` is enabled. This will help indicate that the sensors are writable to the client tools.
Change-Id: I3b61cf5583e697820e28dce3a1d60ea2b08876c2 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
2703b029 | 06-Jul-2021 |
Scron Chang <Scron.Chang@quantatw.com> |
dbus-sdr: Add hybrid sensors stack option
Because the dynamic sensor stack doesn't support non-threshold sensors, this patch gives way for retrieving non-threshold sensors by walking through the sen
dbus-sdr: Add hybrid sensors stack option
Because the dynamic sensor stack doesn't support non-threshold sensors, this patch gives way for retrieving non-threshold sensors by walking through the sensor.yaml. However, this patch filters out any threshold sensors written in the sensor yaml file because the current dbus-sdr already supports them.
The sensor stack has both dynamic and static in this patch, so this new feature is named hybrid sensor stack.
Tested: Try the SDR get command 0xF9: entityID: 0x21 entityInstance: 0 interfaces: xyz.openbmc_project.State.Watchdog: ExpireAction: Offsets: 0x00: assert: xyz.openbmc_project.State.Watchdog.Action.None type: string 0x01: assert: xyz.openbmc_project.State.Watchdog.Action.HardReset type: string 0x02: assert: xyz.openbmc_project.State.Watchdog.Action.PowerOff type: string 0x03: assert: xyz.openbmc_project.State.Watchdog.Action.PowerCycle type: string mutability: Mutability::Read path: /xyz/openbmc_project/watchdog/host0 readingType: assertion sensorNamePattern: nameLeaf sensorReadingType: 0x6F sensorType: 0x23 serviceInterface: org.freedesktop.DBus.Properties
$ ipmitool sdr get host0 Sensor ID : host0 (0xcd) Entity ID : 33.0 (System Management Software) Sensor Type (Discrete): Watchdog2 (0x23) Sensor Reading : 0h Event Message Control : Per-threshold States Asserted : Watchdog2 [Hard reset] Event Status : Event Messages Disabled Assertion Events : Watchdog2 [Hard reset] Event Enable : Event Messages Disabled Assertions Enabled : Watchdog2 [Timer expired] [Hard reset] [Power down] [Power cycle] OEM : 0
Signed-off-by: Scron Chang <Scron.Chang@quantatw.com> Change-Id: I1ac16f483f2f725077de9c15595195b848a224ab
show more ...
|
2b42d7ee | 06-Jul-2021 |
Scron Chang <Scron.Chang@quantatw.com> |
dbus-sdr: Add sensor event type to sensor
The sensor event type only returned threshold sensor(0x01). Implement the functionality of getSensorEventTypeFromPath to support sensor event type codes: un
dbus-sdr: Add sensor event type to sensor
The sensor event type only returned threshold sensor(0x01). Implement the functionality of getSensorEventTypeFromPath to support sensor event type codes: unspecified(0x00), threshold(0x01), and sensor-specified(0x6f).
Signed-off-by: Scron Chang <Scron.Chang@quantatw.com> Change-Id: Ic08bce55422b8d436fb032627a0a8f96fead1d61
show more ...
|
e39d4d84 | 16-Apr-2021 |
Hao Jiang <jianghao@google.com> |
dbus-sdr: Make GetSDR more robust against dbus failure.
SDR list should be persistent while occasional SDR reading error due to underlayer dbus failure. The improvement consists of the following asp
dbus-sdr: Make GetSDR more robust against dbus failure.
SDR list should be persistent while occasional SDR reading error due to underlayer dbus failure. The improvement consists of the following aspects: 1. SDR type is merely determined by sensorTree(from ObjectMapper), whose mechanism is the same as SDR index. 2. Alway return next sdr id even when failure. 3. Avoid unnecessary dbus call when IPMI host doesn't requires the SDR body.
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: If7d7bbb6db587c727f6ea5bcb7a7984f1ed47a80 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
d48c921a | 03-Feb-2021 |
Hao Jiang <jianghao@google.com> |
dbus-sdr: Add the function of reading VR sensor event.
ipmiSenGetSensorEventStatus() now handles VR type sensor. It reads the profile status from VR daemon and set the corresponding event bit to IPM
dbus-sdr: Add the function of reading VR sensor event.
ipmiSenGetSensorEventStatus() now handles VR type sensor. It reads the profile status from VR daemon and set the corresponding event bit to IPMI package.
tested: by ipmi cmd: 0x04 0x2B ``` HOST: $ /tmp# ./ipmitool raw 0x04 0x2B "0xb4" 00 02
BMC: journalctl --since "1 min ago" | grep ipmid Jan 01 00:09:16 $HOST ipmid[3078]: VR sensor $SENSOR_NAME mode is: [1] 800MHz ```
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I491765ec6c840836e0d69122e29d9a86a3dea82a Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
61992ad8 | 29-Mar-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: Add VR to ipmiStorageGetSDR().
ipmiStorageGetSDR() now can handle new sensor type of VR control. The function will generate a SDR type 3 record for the new type of sensors.
tested = ipmit
dbus-sdr: Add VR to ipmiStorageGetSDR().
ipmiStorageGetSDR() now can handle new sensor type of VR control. The function will generate a SDR type 3 record for the new type of sensors.
tested = ipmitool sdr list event ``` $ ipmitool sdr list event -v Running Get PICMG Properties my_addr 0x20, transit 0, target 0 Error response 0xc1 from Get PICMG Properities Running Get VSO Capabilities my_addr 0x20, transit 0, target 0 Invalid completion code received: Invalid command Discovered IPMB address 0x0 Sensor ID : vr_sensor_0_fprof (0xb4) Entity ID : 11.5 (Add-in Card) Sensor Type : Module / Board (0x15)
Sensor ID : vr_sensor_1_fprof (0xb5) Entity ID : 11.6 (Add-in Card) Sensor Type : Module / Board (0x15)
... ```
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I7c6bd2481c0f0a9fdc7db8629cfba9e43e842e37 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
38e7a2b9 | 29-Mar-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: Refactor ipmiStorageGetSDR()
Move some of the code blocks into helper functions: parseSdrIdFromPath() and constructSensorSdr(). This is to handle more types of sensors in the future.
Sign
dbus-sdr: Refactor ipmiStorageGetSDR()
Move some of the code blocks into helper functions: parseSdrIdFromPath() and constructSensorSdr(). This is to handle more types of sensors in the future.
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I58edfd9383985de6c5e5d9e1a42aa9135e449e78 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
9a5b51e3 | 06-Jan-2021 |
Hao Jiang <jianghao@google.com> |
dbus-sdr: Make VoltageRegulatorMode exposed to sensorTree.
getSensorSubtree() now search for xyz.openbmc_project.Control.VoltageRegulatorMode under the path /xyz/openbmc_project/vr.
Only the failur
dbus-sdr: Make VoltageRegulatorMode exposed to sensorTree.
getSensorSubtree() now search for xyz.openbmc_project.Control.VoltageRegulatorMode under the path /xyz/openbmc_project/vr.
Only the failure of searching sensor path is considered as an error.
Tested: ipmiStorageGetSDR()
This requires all the changes in https://gerrit.openbmc-project.xyz/q/hashtag:%22dbus-sdr-vr-sensors%22+(status:open%20OR%20status:merged)
``` ipmitool sdr list event -v Running Get PICMG Properties my_addr 0x20, transit 0, target 0 Error response 0xc1 from Get PICMG Properities Running Get VSO Capabilities my_addr 0x20, transit 0, target 0 Invalid completion code received: Invalid command Discovered IPMB address 0x0 Sensor ID : vr_sensor_0_fprof (0xb4) Entity ID : 11.5 (Add-in Card) Sensor Type : Module / Board (0x15)
Sensor ID : vr_sensor_1_fprof (0xb5) Entity ID : 11.6 (Add-in Card) Sensor Type : Module / Board (0x15)
...
```
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I76d3fedb1cc0a2bc865c2a9c83c0418eb0ee99be Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
d2afd054 | 10-Dec-2020 |
Hao Jiang <jianghao@google.com> |
dbus-sdr: ipmiSetSensorReading handles discrete event for VR
Add the functionality for setting Voltage Regulator Mode as a writable discrete sensor. Move sensor related helper functions into the nam
dbus-sdr: ipmiSetSensorReading handles discrete event for VR
Add the functionality for setting Voltage Regulator Mode as a writable discrete sensor. Move sensor related helper functions into the namespace of sensor.
The VR Controller is distinguished as having an interface of xyz.openbmc_project.Control.VoltageRegulatorMode: https://github.com/openbmc/phosphor-dbus-interfaces/blob/a7a6db3f770f5a1a5fd660ba3f6a611c435db616/xyz/openbmc_project/Control/VoltageRegulatorMode.interface.yaml
Tested = integrate-tested with VR daemon and ipmitool:
Example Tests,
// Setting to profileB (4) $ ipmitool raw 0x4 0x30 0xb4 0 0 4 0 0 0 0 0 0 -v Running Get PICMG Properties my_addr 0x20, transit 0, target 0 Error response 0xc1 from Get PICMG Properities Running Get VSO Capabilities my_addr 0x20, transit 0, target 0 Invalid completion code received: Invalid command Discovered IPMB address 0x0 RAW REQ (channel=0x0 netfn=0x4 lun=0x0 cmd=0x30 data_len=10) RAW REQUEST (10 bytes) b4 00 00 04 00 00 00 00 00 00 RAW RSP (0 bytes)
// Setting to profileA (2) $ ipmitool raw 0x4 0x30 0xb4 0 0 2 0 0 0 0 0 0 -v Running Get PICMG Properties my_addr 0x20, transit 0, target 0 Error response 0xc1 from Get PICMG Properities Running Get VSO Capabilities my_addr 0x20, transit 0, target 0 Invalid completion code received: Invalid command Discovered IPMB address 0x0 RAW REQ (channel=0x0 netfn=0x4 lun=0x0 cmd=0x30 data_len=10) RAW REQUEST (10 bytes) b4 00 00 02 00 00 00 00 00 00 RAW RSP (0 bytes)
$ journalctl -u vr_sensor_profiled.service --since "1 min ago" | tee -- Logs begin at Thu 1970-01-01 00:00:25 UTC, end at Thu 1970-01-01 00:49:52 UTC. -- Jan 01 00:49:11 $HOST vr_sensor_profiled[4195]: Info: Transition VR Sensor 0 profile from profileA to profileB Jan 01 00:49:52 $HOST vr_sensor_profiled[4195]: Info: Transition VR Sensor 0 profile from profileB to profileA
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: I9d6d2e8e5fa6b2be804a2657c6db079562247d90 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
dbafbce6 | 29-Mar-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: sensorcommands: Add a basic handler to set sensor readings
FEATURE_DYNAMIC_SENSORS_WRITE is used to enable the set sensor handler. To enable the sensor writes add `--enable-dynamic_sensors
dbus-sdr: sensorcommands: Add a basic handler to set sensor readings
FEATURE_DYNAMIC_SENSORS_WRITE is used to enable the set sensor handler. To enable the sensor writes add `--enable-dynamic_sensors_write` to the compile flags.
Convert sensor writes to double from raw IPMI value. The 8-bit value in the IPMI Set Sensor command is not a literal value. It is a floating point value encoded using the m, b, rExp, and bExp that are reported in the SDR.
Convert the raw 8-bit value to a floating point value according to the IPMI spec. This implementation only supports linear sensors. sdr_convert_sensor_reading() from ipmitool is a good reference should you need a more feature complete implementation in the future [1].
[1]: https://github.com/ipmitool/ipmitool/blob/42a023ff0726c80e8cc7d30315b987fe568a981d/lib/ipmi_sdr.c#L360
Interpreting bSigned correctly if IPMI indicates the byte is signed Breaking up the complicated math expression into multiple lines Making sure std::pow uses the correct type override of double Adding the input byte to the logging
Tested:
// Before $ ipmitool sensor list | grep fan fan0_pwm | 69.776 | unspecified | ok | na | na | na | na | na | na fan1_pwm | 69.776 | unspecified | ok | na | na | na | na | na | na fan2_pwm | 69.776 | unspecified | ok | na | na | na | na | na | na fan3_pwm | 68.600 | unspecified | ok | na | na | na | na | na | na fan4_pwm | 89.768 | unspecified | ok | na | na | na | na | na | na fan0_tach | 8428.000 | RPM | ok | na | na | na | na | na | na fan1_tach | 8330.000 | RPM | ok | na | na | na | na | na | na fan2_tach | 8330.000 | RPM | ok | na | na | na | na | na | na fan3_tach | 8918.000 | RPM | ok | na | na | na | na | na | na fan4_tach | 8134.000 | RPM | ok | na | na | na | na | na | na
// After setting fan3 to 0 pwm. $ ipmitool sensor list | grep fan fan0_pwm | 69.776 | unspecified | ok | na | na | na | na | na | na fan1_pwm | 69.776 | unspecified | ok | na | na | na | na | na | na fan2_pwm | 69.776 | unspecified | ok | na | na | na | na | na | na fan3_pwm | 3.920 | unspecified | ok | na | na | na | na | na | na fan4_pwm | 89.768 | unspecified | ok | na | na | na | na | na | na fan0_tach | 8428.000 | RPM | ok | na | na | na | na | na | na fan1_tach | 8330.000 | RPM | ok | na | na | na | na | na | na fan2_tach | 8330.000 | RPM | ok | na | na | na | na | na | na fan3_tach | 0.000 | RPM | ok | na | na | na | na | na | na fan4_tach | 8134.000 | RPM | ok | na | na | na | na | na | na | na | na | na | na
Signed-off-by: Peter Lundgren <peterlundgren@google.com> Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Ib26c443480382224092a83662e060df3b759da5c Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
a55c953d | 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.
Ported from: https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/40327
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Idf7c8d4285b286fdc0afb3f0e7260c2d4915b326 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|