diff --git a/get_hdd_temp.sh b/get_hdd_temp.sh index 70fa5b7..40f87f2 100644 --- a/get_hdd_temp.sh +++ b/get_hdd_temp.sh @@ -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 diff --git a/smart_report.sh b/smart_report.sh index 8c44f74..42dd34c 100644 --- a/smart_report.sh +++ b/smart_report.sh @@ -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}