From dd7f86bfa0ae16efea4b9fb5fc923e9d186fe551 Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Tue, 8 Aug 2023 23:38:41 +0200 Subject: [PATCH] Update systeminfo.php Updated "cpu_temp" variable Added new variable "cpu_vendor" Updated "CPU" menu section --- front/systeminfo.php | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/front/systeminfo.php b/front/systeminfo.php index 5884bcbd..1876ce3b 100644 --- a/front/systeminfo.php +++ b/front/systeminfo.php @@ -64,8 +64,9 @@ if (file_exists('/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq')) { // Fallback $stat['cpu_frequ'] = "unknown"; } -$cpu_temp = shell_exec('cat /sys/class/thermal/thermal_zone0/temp'); // Get the CPU temperature +$cpu_temp = shell_exec('cat /sys/class/hwmon/hwmon0/temp1_input'); // Get the CPU temperature $cpu_temp = floatval($cpu_temp) / 1000; // Convert the temperature to degrees Celsius +$cpu_vendor = exec('cat /proc/cpuinfo | grep "vendor_id" | cut -d ":" -f 2' ); // Get the CPU vendor //Memory stats $total_memorykb = shell_exec("cat /proc/meminfo | grep MemTotal | awk '{print $2}'"); $total_memorykb = number_format($total_memorykb, 0, '.', '.'); @@ -204,18 +205,46 @@ echo '