Skip to content

Commit 8e22ba9

Browse files
authored
inte 545s fixes (#15)
add checks for additional smart attibutes
1 parent befa2c5 commit 8e22ba9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

get_hdd_temp.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ for drive in $drives; do
113113
serial=$("$smartctl" -i "$drive" | grep -i "serial number" | awk '{print $NF}')
114114
capacity=$("$smartctl" -i "$drive" | grep "User Capacity" | awk '{print $5 $6}')
115115
temp=$("$smartctl" -A "$drive" | grep "194 Temperature" | awk '{print $10}')
116+
if [ -z "$temp" ]; then
117+
temp=$("$smartctl" -A "$drive" | grep "190 Temperature_Case" | awk '{print $10}')
118+
fi
116119
if [ -z "$temp" ]; then
117120
temp=$("$smartctl" -A "$drive" | grep "190 Airflow_Temperature" | awk '{print $10}')
118121
fi

smart_report.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ if [ $SATA_count -gt 0 ]; then
115115
-v lastTestHours="$lastTestHours" '
116116
/Serial Number:/{serial=$3}
117117
/190 Airflow_Temperature/{temp=$10}
118+
/190 Temperature_Case/{temp=$10}
118119
/194 Temperature/{temp=$10}
119120
/Power_On_Hours/{split($10,a,"+");sub(/h/,"",a[1]);onHours=a[1];}
121+
/Power_Cycle_Count/{startStop=$10}
120122
/Start_Stop_Count/{startStop=$10}
121123
/Spin_Retry_Count/{spinRetry=$10}
122124
/Reallocated_Sector/{reAlloc=$10}

0 commit comments

Comments
 (0)