From 1bbe9b2f8ad0606fa7bd16b4bb2ce2cc9f680eaf Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 22 Jul 2023 09:50:11 -0600 Subject: [PATCH] Prevent CPU number showing more than once on BSD --- app/system/resources/dashboard/system_cpu_status.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/system/resources/dashboard/system_cpu_status.php b/app/system/resources/dashboard/system_cpu_status.php index 8d30153ab7..60671466c4 100644 --- a/app/system/resources/dashboard/system_cpu_status.php +++ b/app/system/resources/dashboard/system_cpu_status.php @@ -34,7 +34,7 @@ if (is_numeric($value)) { $percent_cpu = $percent_cpu + $value; } } if (stristr(PHP_OS, 'BSD')) { - $result = system("dmesg | grep -i --max-count 1 CPUs | sed 's/[^0-9]*//g'"); + $result = shell_exec("dmesg | grep -i --max-count 1 CPUs | sed 's/[^0-9]*//g'"); $cpu_cores = trim($result); } if (stristr(PHP_OS, 'Linux')) { @@ -162,4 +162,4 @@ echo ""; echo "\n"; -?> \ No newline at end of file +?>