| 433c9193 | 29-Oct-2025 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Convert fan_tach sensors to Percent
Redfish 2025.3 clarified the reporting of fan sensors should always be as ReadingType Percent to address issue #6197. [1] The fan_tach sensors on D-Bus a
Sensors: Convert fan_tach sensors to Percent
Redfish 2025.3 clarified the reporting of fan sensors should always be as ReadingType Percent to address issue #6197. [1] The fan_tach sensors on D-Bus are Rotational sensors. Conversion is necessary for these sensor values to reflect Percent instead. [2] This is reflected in a published mockup. [3]
The Redfish update includes an additional sentence for the ReadingType description:
``` "... Services should represent fan speed and pump speed sensors with the `ReadingType` value `Percent`." ```
The ReadingRangeMax and ReadingRangeMin properties also must be converted to percent basis as they are defined to reflect the range of the Reading property.
``` curl -s https://redfish.dmtf.org/schemas/v1/Sensor.v1_11_1.json | jq .definitions.Sensor.properties.ReadingRangeMax.longDescription "This property shall indicate the maximum possible value of the `Reading` property for this sensor. This value is the range of valid readings for this sensor. Values outside this range are discarded as reading errors." ```
A new compile option, redfish-allow-rotational-fans, will maintain the old behavior of reporting fan_tach sensors as Rotational. When the option is disabled they will be reported as Percent. This will allow time for distributions to make adjustments to handle Percent reported fan sensors.
The SpeedRPM Redfish property contains the RPM value for these sensors whether this option is enabled or disabled. Clients wanting to use the RPM value should convert to use the SpeedRPM property instead of the Reading property.
``` curl -s https://redfish.dmtf.org/schemas/v1/Sensor.v1_11_1.json | jq .definitions.Sensor.properties.SpeedRPM { "description": "The rotational speed.", "excerpt": "SensorFan,SensorFanArray,SensorPump", "longDescription": "This property shall contain a reading of the rotational speed of the device in revolutions per minute (RPM) units.", "readonly": true, "type": [ "number", "null" ], "units": "{rev}/min", "versionAdded": "v1_2_0" } ```
With the compile option disabled the following differences will be reflected in the responses for /redfish/v1/Chassis/chassis/Sensors/{}: - ReadingRangeMax/ReadingRangeMin: Converted to percent range, (100,0) - ReadingType: "Percent" - ReadingUnits: "%" - Reading: Computed percent value. The computation is the percent of the RPM Value within the MaxValue to MinValue range as reported by D-Bus for the sensor. - Note: If the percent cannot be computed for any reason the Reading property is set to null. - Note: SpeedRPM: Remains unchanged, it continues to report the RPM value as reported by D-Bus.
Implementation Notes: - The SensorFanExcerpt and SensorFanArrayExcerpt definitions also include the SpeedRPM property. So moved setting of this property to be handled for excerpts as well. - The Sensor schema version has been updated regardless of the compile option setting.
[1] https://github.com/DMTF/Redfish/issues/6197 [2] https://redfish.dmtf.org/schemas/v1/Sensor.v1_11_1.json [3] https://github.com/DMTF/Redfish-Publications/blob/main/mockups/public-rackmount1/Chassis/1U/Sensors/CPUFan1/index.json
Tested: - Added new unit tests for new function getFanPercent() - Adjusted existing unit tests for Sensors to reflect changes for fan_tach sensors. - Redfish Service Validator passes (with option enabled and disabled) - Using hardware simulator hand-edited values for the min/max of the fan_tach sensors: - Option enabled: confirmed Redfish response same before and after code changes. - Option disabled: Confirmed Redfish responses and percent calculation.
Example responses with compile option disabled: ``` // D-Bus: "Value" d 18000 "MaxValue" d 18000 "MinValue" d 0 curl -s -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan0_0", "Name": "fan0 0", "Reading": 100, "ReadingRangeMax": 100, "ReadingRangeMin": 0, "ReadingType": "Percent", "ReadingUnits": "%", "SpeedRPM": 18000.0, "Status": { "Health": "OK", "State": "Enabled" } }
// D-Bus: "Value" d 18000 "MaxValue" d 36000 "MinValue" d 0 curl -s -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan1_0", "Name": "fan1 0", "Reading": 50, "ReadingRangeMax": 100, "ReadingRangeMin": 0, "ReadingType": "Percent", "ReadingUnits": "%", "SpeedRPM": 18000.0, "Status": { "Health": "OK", "State": "Enabled" } }
// Minimum is non-zero // D-Bus: "Value" d 18000 "MaxValue" d 27000 "MinValue" d 9000 curl -s -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan2_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan2_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan2_0", "Name": "fan2 0", "Reading": 50, "ReadingRangeMax": 100, "ReadingRangeMin": 0, "ReadingType": "Percent", "ReadingUnits": "%", "SpeedRPM": 18000.0, "Status": { "Health": "OK", "State": "Enabled" } }
// Minimum is not initialized - Reading is null // D-Bus: "Value" d 18000 "MaxValue" d 18000 "MinValue" d -inf curl -s -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan3_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan3_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan3_0", "Name": "fan3 0", "Reading": null, "ReadingRangeMax": 100, "ReadingRangeMin": 0, "ReadingType": "Percent", "ReadingUnits": "%", "SpeedRPM": 18000.0, "Status": { "Health": "OK", "State": "Enabled" } }
// Minimum and Maximum are not initialized - so Reading is null // D-Bus: "Value" d 18000 "MaxValue" d inf "MinValue" d -inf curl -s -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan4_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan4_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan4_0", "Name": "fan4 0", "Reading": null, "ReadingRangeMax": 100, "ReadingRangeMin": 0, "ReadingType": "Percent", "ReadingUnits": "%", "SpeedRPM": 18000.0, "Status": { "Health": "OK", "State": "Enabled" } } ```
Example of unchanged response with compile option enabled: ``` curl -s -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan0_0", "Name": "fan0 0", "Reading": 18000.0, "ReadingRangeMax": 18000.0, "ReadingRangeMin": 0.0, "ReadingType": "Rotational", "ReadingUnits": "RPM", "SpeedRPM": 18000.0, "Status": { "Health": "OK", "State": "Enabled" } } ```
Change-Id: I8ec1e739bcd5ebce7453a2570569f2edc2284341 Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
| 43feb5cd | 24-Sep-2025 |
Oliver Brewka <oliver.brewka@9elements.com> |
Add Journal EventLog to Manager
In order to get access to the EventLog on multi-host platforms, add Journal EventLog to Manager. This implementation is based on the discussion we had on patch 76319
Add Journal EventLog to Manager
In order to get access to the EventLog on multi-host platforms, add Journal EventLog to Manager. This implementation is based on the discussion we had on patch 76319 [1].
TLDR: On multi-host, we technically would have to split the event log on a per host node basis, so that each host node has its own specific event log.
However, this is currently not supported so we had to decide, whether we put it on a specific ComputerSystem, or refactor the current implementation of the EventLog, to allow for the EventLog LogService to be part of the Managers resource. We chose the latter one, because a), it is not clear on which ComputerSystem to put the EventLog, as long as we aren't splitting the event log per host node, and b), if that particular ComputerSystem is not existing at runtime, there would be no access to the EventLog at all.
This feature can be enabled with the redfish-eventlog-location meson option. By default it is set to 'systems', which translates to the EventLog being under the Systems resource. To enable the EventLog under the Managers resource set
``` -Dredfish-eventlog-location=managers ``` This in turn, disables the EventLog under the ComputerSystem resource.
Tested: Redfish validation succeeded for both ComputerSystem and Managers tree.
``` curl command: curl -w "@curl-format.txt" -c cjar -b cjar -k -X GET 'https://'"${BMC}"':4443/redfish/v1/'"$ROUTE"'' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"''
GET /redfish/v1/Managers/bmc/LogServices { "@odata.id": "/redfish/v1/Managers/bmc/LogServices", "@odata.type": "#LogServiceCollection.LogServiceCollection", "Description": "Collection of LogServices for this Manager", "Members": [ { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal" }, { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog" } ], "Members@odata.count": 2, "Name": "Open BMC Log Services Collection" }
GET /redfish/v1/Managers/bmc/LogServices/EventLog { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog", "@odata.type": "#LogService.v1_2_0.LogService", "Actions": { "#LogService.ClearLog": { "target": "/redfish/v1/Managers/bmc/LogServices/EventLog/Actions/LogService.ClearLog" } }, "DateTime": "2025-09-24T15:22:36+00:00", "DateTimeLocalOffset": "+00:00", "Description": "Manager Event Log Service", "Entries": { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries" }, "Id": "EventLog", "Name": "Event Log Service", "OverWritePolicy": "WrapsWhenFull" }
GET /redfish/v1/Managers/bmc/LogServices/EventLog/Entries { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of Manager Event Log Entries", "Members": [ { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries/1730009576", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2024-10-27T06:12:56+00:00", "EntryType": "Event", "Id": "1730009576", "Message": "Host system DC power is off", "MessageArgs": [], "MessageId": "OpenBMC.0.1.DCPowerOff", "Name": "Manager Event Log Entry", "Severity": "OK" }, ... ], "Members@odata.count": 2820, "Members@odata.nextLink": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries?$skip=1000", "Name": "Manager Event Log Entries" }
GET /redfish/v1/Managers/bmc/LogServices/EventLog/Entries/1730009576 { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/EventLog/Entries/1730009576", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2024-10-27T06:12:56+00:00", "EntryType": "Event", "Id": "1730009576", "Message": "Host system DC power is off", "MessageArgs": [], "MessageId": "OpenBMC.0.1.DCPowerOff", "Name": "Manager Event Log Entry", "Severity": "OK" } ``` ClearLog action: Log files are being successfully deleted from /var/log
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76319
Change-Id: If5b4fe10151b6bfd28a1b49c41f8cfcec1b9132c Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
show more ...
|