Fragile Temperature Parsing #2

Open
opened 2026-02-02 14:55:18 -05:00 by jared · 0 comments
Owner

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

# 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
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/driveAtlas#2