mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Merge pull request #1632 from maykoli/dev/fix-sensors-fan-info
Fix sensors fans info parsing missing
This commit is contained in:
@@ -510,6 +510,13 @@ if (&has_command("sensors")) {
|
||||
my ($cpu_fan_num, $cpu_fan_rpm) = $_ =~ /(?|fan([\d+])\s*:\s+([0-9]+)\s+rpm|cpu(\s)fan\s*:\s+([0-9]+)\s+rpm|cpu\s+fan\s*:\s+([0-9]+)\s+rpm)/i;
|
||||
$cpu++ if ($cpu_volt || $cpu_fan_num);
|
||||
|
||||
# First just store fan data for any device if any
|
||||
push(@fans,
|
||||
{ 'fan' => &trim($cpu_fan_num),
|
||||
'rpm' => $cpu_fan_rpm
|
||||
}
|
||||
) if ($cpu_fan_num);
|
||||
|
||||
# CPU package
|
||||
($cpu_package) = $_ =~ /(?|(package\s+id\s+[\d]+)|(coretemp-[a-z]+-[\d]+))/i
|
||||
if (!$cpu_package);
|
||||
@@ -549,13 +556,6 @@ if (&has_command("sensors")) {
|
||||
($cpu_broadcom) = $_ =~ /cpu_thermal-virtual-[\d]+/i if (!$cpu_broadcom);
|
||||
($cpu_amd) = $_ =~ /\w[\d]{2}temp-pci/i if (!$cpu_amd);
|
||||
|
||||
# First just store fan data for any device if any
|
||||
push(@fans,
|
||||
{ 'fan' => &trim($cpu_fan_num),
|
||||
'rpm' => $cpu_fan_rpm
|
||||
}
|
||||
) if ($cpu_fan_num);
|
||||
|
||||
# Full CPU output #1253
|
||||
if ($cpu) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user