From a1449c9b4bf680de67c04594b6cdad4fcb5a9d83 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 26 Jun 2023 15:52:37 +0200 Subject: [PATCH] added disk temperature check --- runchecks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runchecks.yml b/runchecks.yml index 281bc9c..da6f32c 100644 --- a/runchecks.yml +++ b/runchecks.yml @@ -114,6 +114,10 @@ g_echo_error "SMART of $disk unhealthy: smartctl -H $OPT $disk $(cat ${g_tmp}/smartctl)" 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 validate: /bin/bash -n %s backup: yes