Log DIMM temperatures on each check run
All checks were successful
Check Flake / check-flake (push) Successful in 3m58s
All checks were successful
Check Flake / check-flake (push) Successful in 3m58s
This commit is contained in:
@@ -9,6 +9,7 @@ let
|
|||||||
|
|
||||||
threshold=55
|
threshold=55
|
||||||
hot=""
|
hot=""
|
||||||
|
summary=""
|
||||||
|
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
@@ -18,6 +19,7 @@ let
|
|||||||
*temp1_input:*)
|
*temp1_input:*)
|
||||||
temp="''${line##*: }"
|
temp="''${line##*: }"
|
||||||
whole="''${temp%%.*}"
|
whole="''${temp%%.*}"
|
||||||
|
summary="''${summary:+$summary, }$chip: ''${temp}°C"
|
||||||
if [ "$whole" -ge "$threshold" ]; then
|
if [ "$whole" -ge "$threshold" ]; then
|
||||||
hot="$hot"$'\n'" $chip: ''${temp}°C"
|
hot="$hot"$'\n'" $chip: ''${temp}°C"
|
||||||
fi
|
fi
|
||||||
@@ -25,6 +27,8 @@ let
|
|||||||
esac
|
esac
|
||||||
done < <(sensors -u 'spd5118-*' 2>/dev/null)
|
done < <(sensors -u 'spd5118-*' 2>/dev/null)
|
||||||
|
|
||||||
|
echo "$summary"
|
||||||
|
|
||||||
if [ -n "$hot" ]; then
|
if [ -n "$hot" ]; then
|
||||||
message="DIMM temperature above ''${threshold}°C on ${config.networking.hostName}:$hot"
|
message="DIMM temperature above ''${threshold}°C on ${config.networking.hostName}:$hot"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user