From c05926d43380e37d387fa5e3febc42f701f4d2db Mon Sep 17 00:00:00 2001 From: Tim Connors Date: Tue, 8 Dec 2020 13:35:18 +1100 Subject: [PATCH] Interpret degreeC slightly better (but not yet failsafe) Gah! Software update or locale update, and the degree signs all changed encoding. Temperature overall got interpreted as 0degreeC, which I still need to fix. --- R710-IPMI-TEMP/fan-speed-control.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R710-IPMI-TEMP/fan-speed-control.pl b/R710-IPMI-TEMP/fan-speed-control.pl index f47743d..934b470 100755 --- a/R710-IPMI-TEMP/fan-speed-control.pl +++ b/R710-IPMI-TEMP/fan-speed-control.pl @@ -188,10 +188,10 @@ while () { chomp @ambient_ipmitemps; chomp @hddtemps; - @cputemps = apply { s/.*: *([^ ]*)°C.*/$1/ } @cputemps; - @coretemps = apply { s/.*: *([^ ]*)°C.*/$1/ } @coretemps; + @cputemps = apply { s/.*: *([^ ]*).C.*/$1/ } @cputemps; + @coretemps = apply { s/.*: *([^ ]*).C.*/$1/ } @coretemps; @ambient_ipmitemps = apply { s/.*\| ([^ ]*) degrees C.*/$1/ } @ambient_ipmitemps; - @hddtemps = apply { s/.*: *([^ ]*)°C.*/$1/ } @hddtemps; + @hddtemps = apply { s/.*: *([^ ]*).C.*/$1/ } @hddtemps; #FIXME: it is more important to keep hdds cool than CPUs. We should #put differnt offsets on them - possibly as easily as adding "10" to #hddtemp (but need to work out how to keep log output sane)