Closed afengler closed 5 years ago
I have this recollection that the temperature is encoded, and looking at the value in hexadecimal helps. For the last example above, what does smartctl report? 133145427997 in hex is 0x1F0016001D. So my bet is smartctl reports the temperature as 29 or 31C (I forget which byte is 0).
Yep, 29C So the last of the "segments" is the temperature in hex? So [max]00[min]00[current] if I'm decoding this correctly.
smart -x -a 194 ada0
0x1f0016001d
smartctl -a /dev/ada0 | grep 194
194 Temperature_Celsius 0x0022 071 069 000 Old_age Always - 29 (Min/Max 22/31)
Exactly. With bash you could do something like echo $((133145427997%256))
Thanks, I figured out how to do it in awk to make atasmart sensible I made PR #7 with the changes to the awking
Temperature values, for 194 at least, are reporting odd numbers such as 77309411349 I'm seeing this across multiple SATA drive types, on both SATA and SAS controllers. SAS drives report temperatures correctly.
Seems to get the thresholds correct though:
Here's the outputs of smart -di for a few.