NVMe drives often report data from multiple temperature sensors alongside the standard "Temperature" reading. This PR adds support for extracting those additional sensor values. Negative temperatures are supported.
The extracted temperature sensor data is formatted as a dict where each key represents the numeric index of the sensor, and the value represents the temperature value as reported, for example:
I chose to use a dict with explicit keys rather than a list so that each specific sensor can still be tracked individually, even if one of the sensor readings could not be parsed. For example, if the code just exposed a list (e.g. [43, 46, 44]) as the temperature readings, then later one of the sensors reported an empty value (e.g. - in the smartctl output), we'd just get [42, 47] and have no idea which of the two sensors actually reported valid data.
NVMe drives often report data from multiple temperature sensors alongside the standard "Temperature" reading. This PR adds support for extracting those additional sensor values. Negative temperatures are supported.
The extracted temperature sensor data is formatted as a dict where each key represents the numeric index of the sensor, and the value represents the temperature value as reported, for example:
I chose to use a dict with explicit keys rather than a list so that each specific sensor can still be tracked individually, even if one of the sensor readings could not be parsed. For example, if the code just exposed a list (e.g.
[43, 46, 44]
) as the temperature readings, then later one of the sensors reported an empty value (e.g.-
in the smartctl output), we'd just get[42, 47]
and have no idea which of the two sensors actually reported valid data.