Skip to content

Commit 06ccffb

Browse files
authored
Use numeric values for CPU temperature (Spearfoot#23)
Fixes Spearfoot#20 and Spearfoot#21
1 parent 7470b35 commit 06ccffb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

get-system-temps.pl

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ sub display_cpu_temps
148148
for (my $core=0; $core < $cpucores; $core++)
149149
{
150150
$temp = qx(sysctl -n dev.cpu.$core.temperature);
151+
$temp =~ s/[^\-[:digit:]\.]//g;
151152
chomp($temp);
152153
if ($temp <= 0)
153154
{

0 commit comments

Comments
 (0)