1
0
mirror of https://github.com/Spearfoot/FreeNAS-scripts synced 2025-12-06 01:23:19 +00:00

Refined temperature detection to use "190 Airflow_Temperature" if "194 Temperature" is absent

This commit is contained in:
Keith Nash
2017-04-05 22:22:33 -05:00
committed by GitHub
parent 281e9cbf81
commit f96db93eed
2 changed files with 6 additions and 2 deletions

View File

@@ -76,7 +76,8 @@ for drive in $drives; do
awk -v device="${drive}" -v tempWarn=${tempWarn} -v tempCrit=${tempCrit} -v sectorsCrit=${sectorsCrit} \
-v warnSymbol="${warnSymbol}" -v critSymbol=${critSymbol} '
/Serial Number:/{serial=$3}
/194 Temperature_Celsius/{temp=$10}
/190 Airflow_Temperature/{temp=$10}
/194 Temperature/{temp=$10}
/Power_On_Hours/{split($10,a,"+");sub(/h/,"",a[1]);onHours=a[1];}
/Start_Stop_Count/{startStop=$10}
/Spin_Retry_Count/{spinRetry=$10}