mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
Update system.php
get CPU temp from "/sys/class/thermal/thermal_zone0/temp"
This commit is contained in:
parent
419e10a5b2
commit
6fc73851aa
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue