summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_system_cpu.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-04-26 19:15:18 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-04-26 19:15:18 -0400
commit78db74a47b64623a9e72756b2ec39eaaf5406199 (patch)
tree31ba46fed9226c29d3b704fd98a5639a353791ca /pts-core/functions/pts-functions_system_cpu.php
parent2276d0bf7d6999f4d673aed795e63b343c230557 (diff)
downloadphoronix-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.php17
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);
+}
?>