From 86ef546ffd38a2e164c67cbda2afe4e6d3d0e294 Mon Sep 17 00:00:00 2001 From: Chris Felix <33863449+HigH-HawK@users.noreply.github.com> Date: Wed, 18 Mar 2020 15:28:07 +0100 Subject: Update DefaultOs.php --- lib/OperatingSystems/DefaultOs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OperatingSystems/DefaultOs.php b/lib/OperatingSystems/DefaultOs.php index 3581eae..04a2dfd 100644 --- a/lib/OperatingSystems/DefaultOs.php +++ b/lib/OperatingSystems/DefaultOs.php @@ -62,8 +62,8 @@ class DefaultOs { * @return string */ public function getCPUName() { - $cpu = shell_exec('cat /proc/cpuinfo | grep -i \'Model name\' | cut -f 2 -d ":" | awk \'{$1=$1}1\''); - $cores = shell_exec('cat /proc/cpuinfo | grep -i \'cpu cores\' | cut -f 2 -d ":" | awk \'{$1=$1}1\''); + $cpu = shell_exec('cat /proc/cpuinfo | grep -i \'Model name\' | cut -f 2 -d ":" | awk \'{$1=$1}1\' | head -1'); + $cores = shell_exec('cat /proc/cpuinfo | grep -i \'cpu cores\' | cut -f 2 -d ":" | awk \'{$1=$1}1\' | head -1'); if ($cores === 1) { $cores = ' (' . $cores . ' core)'; } else { -- cgit v1.2.3