From 675c4bcd3c8db593db0a07fe65c5e0b0f2d3e927 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 3 Sep 2019 20:56:31 +0200 Subject: [PATCH] fix cpu % --- System/SystemUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/SystemUtils.php b/System/SystemUtils.php index 1fa817778..372075340 100644 --- a/System/SystemUtils.php +++ b/System/SystemUtils.php @@ -116,7 +116,7 @@ final class SystemUtils \exec('wmic cpu get LoadPercentage', $cpuUsage); $cpuUsage = $cpuUsage[1]; } elseif (\stristr(\PHP_OS, 'LINUX') !== false) { - $cpuUsage = \sys_getloadavg()[0] * 100; + $cpuUsage = \sys_getloadavg()[0] * 100 / \exec('nproc'); } return (int) $cpuUsage;