From 2950d2ce9fb01488901f105171f7e4a2849ce285 Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Wed, 9 Aug 2023 02:50:07 +0200 Subject: [PATCH] Update systeminfo.php Updated variable "total_memorykb" Updated variable "total_memorymb" --- front/systeminfo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/front/systeminfo.php b/front/systeminfo.php index 65db1595..4bf5eee0 100644 --- a/front/systeminfo.php +++ b/front/systeminfo.php @@ -75,8 +75,10 @@ $cpu_temp = floatval($cpu_temp) / 1000; // Convert the temperature to degrees Ce $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 = trim($total_memorykb); $total_memorykb = number_format($total_memorykb, 0, '.', '.'); $total_memorymb = shell_exec("cat /proc/meminfo | grep MemTotal | awk '{print $2/1024}'"); +$total_memorymb = trim($total_memorymb); $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);