mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-21 13:58:42 +00:00
fix cpu usage bugs
This commit is contained in:
parent
3925cb6be7
commit
5b52a92d38
|
|
@ -113,7 +113,7 @@ final class SystemUtils
|
|||
if (\stristr(\PHP_OS, 'WIN') !== false) {
|
||||
$cpuUsage = null;
|
||||
\exec('wmic cpu get LoadPercentage', $cpuUsage);
|
||||
$cpuUsage = $cpuUsage[1];
|
||||
$cpuUsage = (int) ($cpuUsage[1] ?? 0);
|
||||
} elseif (\stristr(\PHP_OS, 'LINUX') !== false) {
|
||||
$loadavg = \sys_getloadavg();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user