diff --git a/app/lib/system.php b/app/lib/system.php index e7007d0a..4e4c8879 100644 --- a/app/lib/system.php +++ b/app/lib/system.php @@ -45,5 +45,10 @@ class System { public function systemLoadPercentage() { return intval(($this->loadAvg1Min() * 100) / $this->processorCount()); } + + public function systemTemperature() { + $cpuTemp = file_get_contents("/sys/class/thermal/thermal_zone0/temp"); + return number_format($cpuTemp/1000, 1); + } }