get('cpu:enable_temperature')) { if (file_exists('/usr/bin/sensors') && exec('/usr/bin/sensors | grep -E "^(CPU Temp|Core 0)" | cut -d \'+\' -f2 | cut -d \'.\' -f1', $t)) { if (isset($t[0])) $temp = $t[0].' °C'; } else { if (exec('cat /sys/class/thermal/thermal_zone0/temp', $t)) { $temp = round($t[0] / 1000).' °C'; } } } $datas = array( 'model' => $model, 'num_cores' => $num_cores, 'frequency' => $frequency, 'cache' => $cache, 'bogomips' => $bogomips, 'temp' => $temp, ); echo json_encode($datas);