new ReadGenericAttributes() api is missing attribute id 190 "Temperature_Celsius"
rare-magma opened this issue · 2 comments
rare-magma commented
I think the new ReadGenericAttributes() api is not handling correctly devices that don't provide an Airflow_Temperature_Cel attribute.
The SSDs and HDDs in my machines only provide Attr ID 194 "Temperature_Celsius":
sudo smartctl -a /dev/sdc | grep 'ID#\|Temp'
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
194 Temperature_Celsius 0x0002 175 175 000 Old_age Always - 37 (Min/Max 24/59)`
Running the latest gotop release that makes use of the ReadGenericAttributes() api fails to display the temps correctly:
Relevant code: https://github.com/anatol/smart.go/blob/main/sata.go#L468
anatol commented
The latest commit should fix this problem.
If you have a chance, could you please update smart.go dependency for gotop and check if it works correctly.
rare-magma commented
@anatol I've updated the smart.go dependency for gotop, tested it and your commit fixed the issue.
Thanks!