Skip to content

Commit 06ccffb

Browse files
authoredSep 4, 2022
Use numeric values for CPU temperature (#23)
Fixes #20 and #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

Lines changed: 1 addition & 0 deletions
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)
Failed to load comments.