diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-26 19:15:18 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-26 19:15:18 -0400 |
commit | 78db74a47b64623a9e72756b2ec39eaaf5406199 (patch) | |
tree | 31ba46fed9226c29d3b704fd98a5639a353791ca /pts-core/functions/pts-functions_system_cpu.php | |
parent | 2276d0bf7d6999f4d673aed795e63b343c230557 (diff) | |
download | phoronix-test-suite-upstream-78db74a47b64623a9e72756b2ec39eaaf5406199.tar.gz phoronix-test-suite-upstream-78db74a47b64623a9e72756b2ec39eaaf5406199.tar.xz phoronix-test-suite-upstream-78db74a47b64623a9e72756b2ec39eaaf5406199.zip |
A lot more sensor support improvements. Support sys.temp and cpu.temp
for MONITOR=
Diffstat (limited to 'pts-core/functions/pts-functions_system_cpu.php')
-rw-r--r-- | pts-core/functions/pts-functions_system_cpu.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_system_cpu.php b/pts-core/functions/pts-functions_system_cpu.php index efb1b47..9371c62 100644 --- a/pts-core/functions/pts-functions_system_cpu.php +++ b/pts-core/functions/pts-functions_system_cpu.php @@ -121,5 +121,22 @@ function processor_frequency($cpu_core = 0) return $info; } +function processor_temperature() +{ + $temp_c = read_linux_sensors("CPU Temp"); + + if(empty($temp_c)) + $temp_c = -1; + + return $temp_c; +} +function pts_record_cpu_temperature() +{ + global $CPU_TEMPERATURE; + $temp = processor_temperature(); + + if($temp != -1) + array_push($CPU_TEMPERATURE, $temp); +} ?> |