Ich bin hier Niemanden böse, im Gegenteil freue ich mich über diese Community und ich liebe IPS.
Aber die Enttäuschung ist natürlich groß, auch wegen dem KNX Secure Problem. Aber da findet ihr hoffentlich auch bald eine Lösung.
@Boui Das wäre fein, wenn du ein „älteres Modell“ hättest, 21 Zoll?
@Dr.Niels Gerne kannst du auf das ganze System zugreifen!
@bgersmann Bitte sehr, hier (CPU Last ist ganz unten):
<?php
$systeminfo = array();
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Systemlaufzeit abfragen
$uptime = exec("uptime -p");
//Rückgabestring zurechtschneiden
// $uptime = preg_replace("/[0-9][0-9]:[0-9][0-9]:[0-9][0-9] up/", "", $uptime);
// $uptime = preg_replace("/,[ ]*.[ ]user.*/", "", $uptime);
// $uptime = ltrim($uptime, " ");
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//CPU-Temperatur abfragen und auf Zehntel-Grad runden
exec("cat /sys/class/thermal/thermal_zone0/temp", $cputemp);
$cputemp = round($cputemp[0] / 1000, 1);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Kernelversion abfragen
$kernel = exec("uname -r");
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Modell
$modell = exec("cat /sys/firmware/devicetree/base/model");
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Release
$release = exec("cat /etc/*release | grep VERSION= ");
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//CPU frequ
$cpu_frequ = exec("cat /sys/devices/system/cpu/cpu0//cpufreq/scaling_cur_freq") / 1000;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//CPU Spannung
$cpu_volt = exec("vcgencmd measure_volts | tr -d 'volt=' | tr -d 'V'");
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//CPU Prozessor
$cpu_proz = exec("sudo lscpu | grep 'Model name:' -h -m 1");
$cpu_proz = substr($cpu_proz, 25);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//CPU Prozessor Kerne
$cpu_prozkern = exec("cat /proc/cpuinfo | grep processor | wc -l");
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//CPU Prozessor Auslastung
// $cpu_load = sys_getloadavg(); OLD
$cpuLoad = getServerLoad();
if (is_null($cpuLoad))
{
$cpuLoad = 0.0;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Speichernutzung abfragen
exec("df / --output=used,size", $spaceinfo);
$usedspace=0;
$totalspace=0;
//erstes Element wird übersprungen, da es nur Text enthält
for($i = 1; $i < sizeOf($spaceinfo); $i++){
$info = trim($spaceinfo[$i]);
$info = preg_replace('!\s+!', ' ', $info);
$spacearray = explode(" ", $info);
$usedspace += $spacearray[0]/1024;
$totalspace += $spacearray[1]/1024;
}
//Benutzten Speicherplatz in Prozent auf ganze Zahlen runden
$spaceusagepercent = round(($usedspace / $totalspace)*100);
// Freien Speicherplatz berechnen
$freespace = ($totalspace - $usedspace);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Arbeitsspeicher-Info abfragen
exec("free", $raminfo);
//RAM-Auslastung aus Ausgabe herauslesen
$info = trim($raminfo[1]);
$info = preg_replace('!\s+!', ' ', $info);
$ramarray = explode(" ", $info);
$totalram = $ramarray[1]/1024;
$usedram = $ramarray[2]/1024;
$freeram = ($totalram - $usedram);
//RAM-Auslastung in Prozent auf ganze Zahlen runden
$ramusage = round(($usedram / $totalram)*100);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Firmwareversion des Betriebssystems abfragen
//Die Versionsinfo ist ein Array mit 3 Werten: Erscheinungsdatum, Copyright-Hinweis, Versionsnummer
exec("sudo vcgencmd version", $firmwareversion);
//Ausgegeben wird nur das erste Element mit dem Erscheinungsdatum der Versionsinfo
$firmwareversion = $firmwareversion[0];
//JSON-Objekt erstellen und zurückgeben
// return json_encode(array('systeminfo' => $systeminfo));
// Variablen schreiben
setvalue(57027, $freeram);
setvalue(23822, $totalspace);
setvalue(29842, $usedspace);
setvalue(57285, $totalram);
setvalue(39380, $usedram);
Setvalue(12306,$cputemp);
Setvalue(43428,$uptime);
Setvalue(41719,$firmwareversion);
Setvalue(19566,$ramusage);
Setvalue(48666,$spaceusagepercent);
Setvalue(34566,$freespace);
Setvalue(11169,$kernel);
Setvalue(25146,$modell);
SetValue(32926, $cpu_frequ);
SetValue(37154, $cpu_volt);
SetValue(48704, $cpu_proz);
SetValue(37256, $cpu_prozkern);
SetValue(10466, $cpuLoad);
SetValue(44301, $release);
// Funktionen CPU Last
function _getServerLoadLinuxData()
{
if (is_readable("/proc/stat"))
{
$stats = @file_get_contents("/proc/stat");
if ($stats !== false)
{
// Remove double spaces to make it easier to extract values with explode()
$stats = preg_replace("/[[:blank:]]+/", " ", $stats);
// Separate lines
$stats = str_replace(array("\r\n", "\n\r", "\r"), "\n", $stats);
$stats = explode("\n", $stats);
// Separate values and find line for main CPU load
foreach ($stats as $statLine)
{
$statLineData = explode(" ", trim($statLine));
// Found!
if
(
(count($statLineData) >= 5) &&
($statLineData[0] == "cpu")
)
{
return array(
$statLineData[1],
$statLineData[2],
$statLineData[3],
$statLineData[4],
);
}
}
}
}
return null;
}
// Returns server load in percent (just number, without percent sign)
function getServerLoad()
{
$load = null;
if (stristr(PHP_OS, "win"))
{
$cmd = "wmic cpu get loadpercentage /all";
@exec($cmd, $output);
if ($output)
{
foreach ($output as $line)
{
if ($line && preg_match("/^[0-9]+\$/", $line))
{
$load = $line;
break;
}
}
}
}
else
{
if (is_readable("/proc/stat"))
{
// Collect 2 samples - each with 1 second period
// See: https://de.wikipedia.org/wiki/Load#Der_Load_Average_auf_Unix-Systemen
$statData1 = _getServerLoadLinuxData();
sleep(1);
$statData2 = _getServerLoadLinuxData();
if
(
(!is_null($statData1)) &&
(!is_null($statData2))
)
{
// Get difference
$statData2[0] -= $statData1[0];
$statData2[1] -= $statData1[1];
$statData2[2] -= $statData1[2];
$statData2[3] -= $statData1[3];
// Sum up the 4 values for User, Nice, System and Idle and calculate
// the percentage of idle time (which is part of the 4 values!)
$cpuTime = $statData2[0] + $statData2[1] + $statData2[2] + $statData2[3];
// Invert percentage to get CPU time, not idle time
$load = 100 - ($statData2[3] * 100 / $cpuTime);
}
}
}
return $load;
}