From 5e0266ae126c57c4214322ab68ec62a54de01d35 Mon Sep 17 00:00:00 2001 From: Tim Connors Date: Sat, 19 Jun 2021 22:01:18 +1000 Subject: [PATCH] hddtemp sometimes prints one drive as having a temperature as 255! (rather than just marking it invalid some *sane* way). Filter those out --- R710-IPMI-TEMP/fan-speed-control.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R710-IPMI-TEMP/fan-speed-control.pl b/R710-IPMI-TEMP/fan-speed-control.pl index 324f1a3..ec5a8e5 100755 --- a/R710-IPMI-TEMP/fan-speed-control.pl +++ b/R710-IPMI-TEMP/fan-speed-control.pl @@ -179,7 +179,7 @@ while () { # could just be a simple pipe, but hddtemp has a strong posibility # to be stuck in a D state, and hold STDERR open despite a kill # -9, so instead just send it to a tempfile, and read from that tempfile - system("timeout -k 1 20 hddtemp /dev/sd? > $tempfilename"); + system("timeout -k 1 20 hddtemp /dev/sd? | grep -v 255 > $tempfilename"); @hddtemps=`grep [0-9] < $tempfilename`; } if (!@ambient_ipmitemps) {