mirror of
https://github.com/Spearfoot/FreeNAS-scripts
synced 2025-12-06 01:23:19 +00:00
@@ -113,6 +113,9 @@ for drive in $drives; do
|
|||||||
serial=$("$smartctl" -i "$drive" | grep -i "serial number" | awk '{print $NF}')
|
serial=$("$smartctl" -i "$drive" | grep -i "serial number" | awk '{print $NF}')
|
||||||
capacity=$("$smartctl" -i "$drive" | grep "User Capacity" | awk '{print $5 $6}')
|
capacity=$("$smartctl" -i "$drive" | grep "User Capacity" | awk '{print $5 $6}')
|
||||||
temp=$("$smartctl" -A "$drive" | grep "194 Temperature" | awk '{print $10}')
|
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
|
if [ -z "$temp" ]; then
|
||||||
temp=$("$smartctl" -A "$drive" | grep "190 Airflow_Temperature" | awk '{print $10}')
|
temp=$("$smartctl" -A "$drive" | grep "190 Airflow_Temperature" | awk '{print $10}')
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -115,8 +115,10 @@ if [ $SATA_count -gt 0 ]; then
|
|||||||
-v lastTestHours="$lastTestHours" '
|
-v lastTestHours="$lastTestHours" '
|
||||||
/Serial Number:/{serial=$3}
|
/Serial Number:/{serial=$3}
|
||||||
/190 Airflow_Temperature/{temp=$10}
|
/190 Airflow_Temperature/{temp=$10}
|
||||||
|
/190 Temperature_Case/{temp=$10}
|
||||||
/194 Temperature/{temp=$10}
|
/194 Temperature/{temp=$10}
|
||||||
/Power_On_Hours/{split($10,a,"+");sub(/h/,"",a[1]);onHours=a[1];}
|
/Power_On_Hours/{split($10,a,"+");sub(/h/,"",a[1]);onHours=a[1];}
|
||||||
|
/Power_Cycle_Count/{startStop=$10}
|
||||||
/Start_Stop_Count/{startStop=$10}
|
/Start_Stop_Count/{startStop=$10}
|
||||||
/Spin_Retry_Count/{spinRetry=$10}
|
/Spin_Retry_Count/{spinRetry=$10}
|
||||||
/Reallocated_Sector/{reAlloc=$10}
|
/Reallocated_Sector/{reAlloc=$10}
|
||||||
|
|||||||
Reference in New Issue
Block a user