mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-16 03:58:39 +00:00
fix cpu %
This commit is contained in:
parent
e0aa1406e2
commit
675c4bcd3c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user