Skip to content

Commit

Permalink
inte 545s fixes (#15)
Browse files Browse the repository at this point in the history
add checks for additional smart attibutes
  • Loading branch information
marunjar committed Dec 10, 2020
1 parent befa2c5 commit 8e22ba9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions get_hdd_temp.sh
Expand Up @@ -113,6 +113,9 @@ for drive in $drives; do
serial=$("$smartctl" -i "$drive" | grep -i "serial number" | awk '{print $NF}')
capacity=$("$smartctl" -i "$drive" | grep "User Capacity" | awk '{print $5 $6}')
temp=$("$smartctl" -A "$drive" | grep "194 Temperature" | awk '{print $10}')
if [ -z "$temp" ]; then
temp=$("$smartctl" -A "$drive" | grep "190 Temperature_Case" | awk '{print $10}')
fi
if [ -z "$temp" ]; then
temp=$("$smartctl" -A "$drive" | grep "190 Airflow_Temperature" | awk '{print $10}')
fi
Expand Down
2 changes: 2 additions & 0 deletions smart_report.sh
Expand Up @@ -115,8 +115,10 @@ if [ $SATA_count -gt 0 ]; then
-v lastTestHours="$lastTestHours" '
/Serial Number:/{serial=$3}
/190 Airflow_Temperature/{temp=$10}
/190 Temperature_Case/{temp=$10}
/194 Temperature/{temp=$10}
/Power_On_Hours/{split($10,a,"+");sub(/h/,"",a[1]);onHours=a[1];}
/Power_Cycle_Count/{startStop=$10}
/Start_Stop_Count/{startStop=$10}
/Spin_Retry_Count/{spinRetry=$10}
/Reallocated_Sector/{reAlloc=$10}
Expand Down

0 comments on commit 8e22ba9

Please sign in to comment.