Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new ReadGenericAttributes() api is missing attribute id 190 "Temperature_Celsius" #7

Closed
rare-magma opened this issue Sep 29, 2022 · 2 comments

Comments

@rare-magma
Copy link

rare-magma commented Sep 29, 2022

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:
image

Relevant code: https://github.com/anatol/smart.go/blob/main/sata.go#L468

@anatol anatol closed this as completed in 336d113 Sep 29, 2022
@anatol
Copy link
Owner

anatol commented Sep 29, 2022

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
Copy link
Author

@anatol I've updated the smart.go dependency for gotop, tested it and your commit fixed the issue.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants