| commit | f89f153959054cf67a4b9d18ad4369991f15b951 | [log] [tgz] |
|---|---|---|
| author | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 16 15:20:48 2024 -0400 |
| committer | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 16 15:20:48 2024 -0400 |
| tree | 62076fe82a8edc911f3a3b473724d21a1912d58c | |
| parent | 81b2e2204a268b84df37bd1ea6d44dbc0bcfa171 [diff] |
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: I9babcd0ff6648be0d5e827ed5e42ce1b9bc9d34d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
phosphor-nvme is the nvme manager service maintains for NVMe drive information update and related notification processing service. The service update information to xyz/openbmc_project/Nvme/Status.interface.yaml, xyz/openbmc_project/Sensor/Value.interface.yaml and other interfaces in xyz.openbmc_project.Inventory.Manager.
The service xyz.openbmc_project.nvme.manager provides object on D-Bus:
where object implements interface xyz.openbmc_project.Sensor.Value.
NVMe drive export as sensor and sensor value is temperature of drive. It can get the sensor value of the drive through ipmitool command sdr elist if the corresponding settings in the sensor map are configured correctly. For example:
To get sensor value:
### With ipmi command on BMC ipmitool sdr elist
The service also updates other NVMe drive information to D-bus xyz.openbmc_project.Inventory.Manager. The service xyz.openbmc_project.Inventory.Manager provides object on D-Bus:
where object implements interfaces:
Interface xyz.openbmc_project.Nvme.Status with the following properties:
| Property | Type | Description |
|---|---|---|
| SmartWarnings | string | Indicates smart warnings for the state |
| StatusFlags | string | Indicates the status of the drives |
| DriveLifeUsed | string | A vendor specific estimate of the percentage |
| TemperatureFault | bool | If warning type about temperature happened |
| BackupdrivesFault | bool | If warning type about backup drives happened |
| CapacityFault | bool | If warning type about capacity happened |
| DegradesFault | bool | If warning type about degrades happened |
| MediaFault | bool | If warning type about media happened |
Interface xyz.openbmc_project.Inventory.Item with the following properties:
| Property | Type | Description |
|---|---|---|
| Present | bool | Whether or not the item is present |
Interface xyz.openbmc_project.Inventory.Decorator.Asset with the following properties:
| Property | Type | Description |
|---|---|---|
| SerialNumber | string | The item serial number |
| Manufacturer | string | The item manufacturer |
Each property in the inventory manager can be obtained via the busctl get-property command. For example:
To get property Present:
### With busctl on BMC busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/nvme0 xyz.openbmc_project.Inventory.Item Present
There is a JSON configuration file nvme_config.json for drive index, bus ID, and the LED object path and bus name for each drive. For example,
{ "config": [ { "NVMeDriveIndex": 0, "NVMeDriveBusID": 16, "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_0_fault", "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_0_locate", "NVMeDriveLocateLEDControllerBusName": "xyz.openbmc_project.LED.Controller.led_u2_0_locate", "NVMeDriveLocateLEDControllerPath": "/xyz/openbmc_project/led/physical/led_u2_0_locate", "NVMeDrivePresentPin": 148, "NVMeDrivePwrGoodPin": 161 }, { "NVMeDriveIndex": 1, "NVMeDriveBusID": 17, "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_1_fault", "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_1_locate", "NVMeDriveLocateLEDControllerBusName": "xyz.openbmc_project.LED.Controller.led_u2_1_locate", "NVMeDriveLocateLEDControllerPath": "/xyz/openbmc_project/led/physical/led_u2_1_locate", "NVMeDrivePresentPin": 149, "NVMeDrivePwrGoodPin": 162 } ], "threshold": [ { "criticalHigh": 70, "criticalLow": 0, "maxValue": 70, "minValue": 0 } ] }
xyz.openbmc_project.nvme.manager description above.This service will run automatically and look up NVMe drives every second.