mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Fix Cortex CPU detection in sensors output
https://forum.virtualmin.com/t/cpu-temp-id-missing-dashboard/123096 [build]
This commit is contained in:
@@ -500,7 +500,7 @@ my @cpu;
|
||||
my @fans;
|
||||
my @cputhermisters;
|
||||
if (&has_command("sensors")) {
|
||||
my ($cpu, $cpu_aux, $cpu_package, $cpu_broadcom, $cpu_amd);
|
||||
my ($cpu, $cpu_aux, $cpu_unnamed, $cpu_package, $cpu_broadcom, $cpu_amd);
|
||||
my $fh = "SENSORS";
|
||||
|
||||
# Examples https://gist.github.com/547451c9ca376b2d18f9bb8d3748276c
|
||||
@@ -563,7 +563,7 @@ if (&has_command("sensors")) {
|
||||
else {
|
||||
|
||||
# Auxiliary CPU temperature and fans were already captured
|
||||
next if ($cpu_aux);
|
||||
next if ($cpu_aux && !$cpu_unnamed);
|
||||
|
||||
# CPU types
|
||||
($cpu_broadcom) = $_ =~ /cpu_thermal-virtual-[\d]+/i if (!$cpu_broadcom);
|
||||
@@ -598,6 +598,13 @@ if (&has_command("sensors")) {
|
||||
'temp' => int($2)
|
||||
});
|
||||
}
|
||||
elsif (/cpu\s+temp(.*?):\s+([\+\-][0-9\.]+)/i) {
|
||||
$cpu_unnamed++;
|
||||
push(@cpu,
|
||||
{ 'core' => $cpu_unnamed,
|
||||
'temp' => int($2)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
# AMD
|
||||
|
||||
Reference in New Issue
Block a user