diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-09 09:54:00 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-09 09:54:00 -0500 |
commit | 53104abaa9afe7d8f907005830d19b30c256d335 (patch) | |
tree | 47e34ac48d866fe519ad96116e652b47aac98432 /pts-core/functions | |
parent | 73e1506e3c4740521466617a3b4cc651129d9e16 (diff) | |
download | phoronix-test-suite-upstream-53104abaa9afe7d8f907005830d19b30c256d335.tar.gz phoronix-test-suite-upstream-53104abaa9afe7d8f907005830d19b30c256d335.tar.xz phoronix-test-suite-upstream-53104abaa9afe7d8f907005830d19b30c256d335.zip |
pts-core: Improve detection of CPU processor temperature
Diffstat (limited to 'pts-core/functions')
-rw-r--r-- | pts-core/functions/pts-functions_system_cpu.php | 2 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_system_hardware.php | 2 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_system_parsing.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/pts-core/functions/pts-functions_system_cpu.php b/pts-core/functions/pts-functions_system_cpu.php index e26538b..03d3641 100644 --- a/pts-core/functions/pts-functions_system_cpu.php +++ b/pts-core/functions/pts-functions_system_cpu.php @@ -197,7 +197,7 @@ function hw_cpu_default_frequency($cpu_core = 0) function hw_cpu_temperature() { // Read the processor temperature - $temp_c = read_sensors(array("CPU Temp", "Core 0")); + $temp_c = read_sensors(array("CPU Temp", "Core 0", "Core0 Temp", "Core1 Temp")); if(empty($temp_c)) { diff --git a/pts-core/functions/pts-functions_system_hardware.php b/pts-core/functions/pts-functions_system_hardware.php index 31c5542..44a883a 100644 --- a/pts-core/functions/pts-functions_system_hardware.php +++ b/pts-core/functions/pts-functions_system_hardware.php @@ -352,7 +352,7 @@ function hw_sys_memory_string() { $mem_size = read_dmidecode("memory", "Memory Device", "Size", false, array("Not Installed", "No Module Installed")); $mem_speed = read_dmidecode("memory", "Memory Device", "Speed", true, "Unknown"); - $mem_type = read_dmidecode("memory", "Memory Device", "Type", true, "Unknown"); + $mem_type = read_dmidecode("memory", "Memory Device", "Type", true, array("Unknown", "Other")); } if(is_array($mem_type)) diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php index 54e781d..3932e66 100644 --- a/pts-core/functions/pts-functions_system_parsing.php +++ b/pts-core/functions/pts-functions_system_parsing.php @@ -131,7 +131,7 @@ function read_sensors($attributes) $this_remainder = trim(str_replace(array('+', '°'), ' ', $line[1])); $this_value = substr($this_remainder, 0, strpos($this_remainder, ' ')); - if(is_numeric($this_value)) + if(is_numeric($this_value) && $this_value > 0) { $value = $this_value; } |