From b0e34a802db23b16245773e7dd8c344c3438428f Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Tue, 8 Aug 2023 21:34:00 +0200
Subject: [PATCH 1/5] Update systeminfo.php
Actualizada seccion "General"
Actualizada seccion "This Client"
Actualizada seccion "System"
Actualizada seccion "Network"
---
front/systeminfo.php | 44 ++++++++++++++++++++++++++++++++------------
1 file changed, 32 insertions(+), 12 deletions(-)
diff --git a/front/systeminfo.php b/front/systeminfo.php
index 3825a5c7..fefd870e 100644
--- a/front/systeminfo.php
+++ b/front/systeminfo.php
@@ -72,7 +72,11 @@ $total_memorymb = shell_exec("cat /proc/meminfo | grep MemTotal | awk '{print $2
$total_memorymb = number_format($total_memorymb, 0, '.', '.');
$mem_used = round(memory_get_usage() / 1048576 * 100, 2);
$memory_usage_percent = round(($mem_used / $total_memorymb), 2);
-//Load System
+//System
+$system_namekernel = shell_exec("uname");
+$system_namesystem = shell_exec("uname -o");
+$system_full = shell_exec("uname -a");
+$system_architecture = shell_exec("uname -m");
$load_average = sys_getloadavg();
//Date & Time
$date = new DateTime();
@@ -110,19 +114,19 @@ echo '
-
User Agent
+
User Agent:
' . $_SERVER['HTTP_USER_AGENT'] . '
@@ -163,12 +167,28 @@ echo '
-
Uptime
+
Uptime:
' . $stat['uptime'] . '
-
Operating System
+
Kernel:
+
' . $system_namekernel . '
+
+
+
System:
+
' . $system_namesystem . '
+
+
+
Operating System:
' . $stat['os_version'] . '
+
+
+
Uname:
+
' . $system_full . '
+
+
+
Architecture:
+
' . $system_architecture . '
Load AVG:
@@ -322,11 +342,11 @@ echo '
' . $_SERVER['QUERY_STRING'] . '
-
HTTP_host:
+
HTTP host:
' . $_SERVER['HTTP_HOST'] . '
-
HTTP_referer:
+
HTTP referer:
' . $_SERVER['HTTP_REFERER'] . '
@@ -342,11 +362,11 @@ echo '
' . $_SERVER['HTTP_ACCEPT_ENCODING'] . '
-
Request_Method:
+
Request Method:
' . $_SERVER['REQUEST_METHOD'] . '
-
Request_time:
+
Request time:
' . $_SERVER['REQUEST_TIME'] . '
From b231a06ee8e246e82bc7b88d988423d5b1c92bc2 Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Tue, 8 Aug 2023 22:30:50 +0200
Subject: [PATCH 2/5] Update systeminfo.php
Added a new separator comment for the "General" section variables
---
front/systeminfo.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/front/systeminfo.php b/front/systeminfo.php
index fefd870e..5884bcbd 100644
--- a/front/systeminfo.php
+++ b/front/systeminfo.php
@@ -29,6 +29,7 @@
Date: Tue, 8 Aug 2023 23:38:41 +0200
Subject: [PATCH 3/5] 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 '
CPU
+
+
CPU Vendor:
+
' . $cpu_vendor . '
+
CPU Name:
' . $stat['cpu_model'] . '
CPU Cores:
-
' . $stat['cpu'] . ' @ ' . $stat['cpu_frequ'] . ' MHz
+
' . $stat['cpu'] . '
+
+
CPU Speed:
+
' . $stat['cpu_frequ'] . ' MHz
+
CPU Temp:
'. $cpu_temp .' °C
-
+
';
+ // Get the number of CPU cores
+ $num_cpus = $stat['cpu'];
+ $num_cpus = $num_cpus +2;
+
+ // Iterate over the CPU cores
+ for ($i = 2,$a = 0; $i < $num_cpus; $i++,$a++) {
+
+ // Get the CPU temperature
+ $cpu_tempxx = shell_exec('cat /sys/class/hwmon/hwmon0/temp' . $i . '_input');
+
+ // Convert the temperature to degrees Celsius
+ $cpu_tempxx = floatval($cpu_tempxx) / 1000;
+
+ // Print the CPU temperature
+ echo '
+
CPU Temp ' . $a . ':
+
' . $cpu_tempxx . ' °C
+
';
+ }
+ echo '
';
From 4f59d0867dc3664c8d11a509f2490234ed0414a0 Mon Sep 17 00:00:00 2001
From: Carlos V <76731844+cvc90@users.noreply.github.com>
Date: Wed, 9 Aug 2023 00:32:56 +0200
Subject: [PATCH 4/5] Update systeminfo.php
Added new section "Motherboard"
Added new section "Motherboard stat"
Added new variable "motherboard_name" in the section "Motherboard stat"
Added new variable "motherboard_manufactured" in the section "Motherboard stat"
Added new variable "motherboard_revision" in the section "Motherboard stat"
Added new variable "motherboard_bios" in the section "Motherboard stat"
Added new variable "motherboard_biosdate" in the section "Motherboard stat"
Added new variable "biosvendor" in the section "Motherboard stat"
---
front/systeminfo.php | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/front/systeminfo.php b/front/systeminfo.php
index d6b8c303..65db1595 100644
--- a/front/systeminfo.php
+++ b/front/systeminfo.php
@@ -38,6 +38,13 @@ if ($os_version == '') {$os_version = exec('uname -o');}
//$os_version_arr = explode("\n", trim($os_version));
$stat['os_version'] = str_replace('"', '', str_replace('PRETTY_NAME=', '', $os_version));
$stat['uptime'] = str_replace('up ', '', shell_exec("uptime -p"));
+//Motherboard stat
+$motherboard_name = shell_exec('cat /sys/class/dmi/id/board_name'); // Get the Motherboard name
+$motherboard_manufactured = shell_exec('cat /sys/class/dmi/id/board_vendor'); // Get the Motherboard manufactured
+$motherboard_revision = shell_exec('cat /sys/class/dmi/id/board_version'); // Get the Motherboard revision
+$motherboard_bios = shell_exec('cat /sys/class/dmi/id/bios_version'); // Get the Motherboard BIOS
+$motherboard_biosdate = shell_exec('cat /sys/class/dmi/id/bios_date'); // Get the Motherboard BIOS date
+$motherboard_biosvendor = shell_exec('cat /sys/class/dmi/id/bios_vendor'); // Get the Motherboard BIOS vendor
//CPU stat
$prevVal = shell_exec("cat /proc/cpuinfo | grep processor");
$prevArr = explode("\n", trim($prevVal));
@@ -198,6 +205,39 @@ echo '
';
+// Motherboard ----------------------------------------------------------
+echo '
+
+
+
+
Name:
+
' . $motherboard_name . '
+
+
+
Manufactured by:
+
' . $motherboard_manufactured . '
+
+
+
Revision:
+
' . $motherboard_revision. '
+
+
+
BIOS:
+
' . $motherboard_bios . '
+
+
+
BIOS date_
+
' . $motherboard_biosdate . '
+
+
+
BIOS vendor:
+
' . $motherboard_biosvendor . '
+
+
+
';
+
// CPU ----------------------------------------------------------
echo '