added disk temperature check

This commit is contained in:
olli 2023-06-26 15:52:37 +02:00
parent 1c98cc589d
commit a1449c9b4b

View File

@ -114,6 +114,10 @@
g_echo_error "SMART of $disk unhealthy: smartctl -H $OPT $disk $(cat ${g_tmp}/smartctl)" g_echo_error "SMART of $disk unhealthy: smartctl -H $OPT $disk $(cat ${g_tmp}/smartctl)"
fi fi
fi fi
# temperature check
temperature=$(smartctl -x $OPT $disk | egrep "^Current Temperature" | perl -pe 's/ +/ /g' | cut -d" " -f3)
[ -z "$temperature" ] && continue
[ $temperature -gt 65 ] && g_echo_error "SMART temperature of disk $disk high ($temperature Celsius)"
done done
validate: /bin/bash -n %s validate: /bin/bash -n %s
backup: yes backup: yes