Fragile Temperature Parsing #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Line ~218
local temp=$(echo "$smart_info" | grep "Temperature" | awk '{print $10}' | head -1)
Issue:
Temperature is NOT always in column 10
Different drive manufacturers use different formats
NVMe drives report differently than SATA
May return empty or wrong value
Example formats:
194 Temperature_Celsius 0x0022 035 042 000 Old_age Always - 35
Temperature: 42 Celsius
Current Temperature: 35 Celsius