From 8fe10e63142f87aa21b83aafc033148c9aae3e45 Mon Sep 17 00:00:00 2001 From: Carlos V <76731844+cvc90@users.noreply.github.com> Date: Sat, 5 Aug 2023 14:56:05 +0200 Subject: [PATCH] Update systeminfo.php Fix variable 'mem_used' --- front/systeminfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/systeminfo.php b/front/systeminfo.php index fe0b0fa0..8906de46 100644 --- a/front/systeminfo.php +++ b/front/systeminfo.php @@ -70,7 +70,7 @@ if (file_exists('/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq')) { $total_memory = shell_exec("cat /proc/meminfo | grep MemTotal | cut -d' ' -f2-") / 1024 | bc; $mem_result = shell_exec("cat /proc/meminfo | grep MemTotal"); $stat['mem_total'] = round(preg_replace("#[^0-9]+(?:\.[0-9]*)?#", "", $mem_result) / 1024 / 1024, 3); -$stat['mem_used'] = round(memory_get_usage() / 1048576, 2); +$stat['mem_used'] = round(memory_get_usage() / 1048576 * 100, 2); $memory_usage_percent = round($mem_used * 100, 2); //Load System $load_average = sys_getloadavg();