fix cpu %

This commit is contained in:
Dennis Eichhorn 2019-09-03 20:56:31 +02:00
parent e0aa1406e2
commit 675c4bcd3c

View File

@ -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;