diff options
author | 01101001c <01101001c@gmail.com> | 2013-03-18 17:08:01 -0700 |
---|---|---|
committer | 01101001c <01101001c@gmail.com> | 2013-03-18 17:08:01 -0700 |
commit | 4fc5400000a74382267b0955fdaf6b699ef2fc96 (patch) | |
tree | aba9016770d8474d977f5ee3c0d8f950cdbc1d5a /usr/local/www/widgets/include/thermal_sensors.inc | |
parent | 9072d260ddeee1d9bf8f62bb92290850c961df26 (diff) | |
download | pfsense-4fc5400000a74382267b0955fdaf6b699ef2fc96.zip pfsense-4fc5400000a74382267b0955fdaf6b699ef2fc96.tar.gz |
Thermal Sensors Widget (for pfSense v2.1-BETA1 and up).
Original post: http://forum.pfsense.org/index.php/topic,59193.0.html
Diffstat (limited to 'usr/local/www/widgets/include/thermal_sensors.inc')
-rw-r--r-- | usr/local/www/widgets/include/thermal_sensors.inc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/usr/local/www/widgets/include/thermal_sensors.inc b/usr/local/www/widgets/include/thermal_sensors.inc new file mode 100644 index 0000000..2ebc31d --- /dev/null +++ b/usr/local/www/widgets/include/thermal_sensors.inc @@ -0,0 +1,27 @@ +<?php +/* + $Id: thermal_sensors.inc + File location: + \usr\local\www\widgets\include\ + + Used by: + \usr\local\www\widgets\widgets\thermal_sensors.widget.php + + +*/ + +//set variable for custom title +$thermal_sensors_widget_title = "Thermal Sensors"; +//$thermal_sensors_widget_link = "thermal_sensors.php"; + + +//returns core temp data (from coretemp.ko or amdtemp.ko driver) as "|"-delimited string. +//NOTE: depends on proper cofing in System >> Advanced >> Miscellaneous tab >> Thermal Sensors section. +function getThermalSensorsData() { + + exec("/sbin/sysctl -a | grep temperature", $dfout); + $thermalSensorsData = join("|", $dfout); + return $thermalSensorsData; + +} +?> |