mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
fix cpu usage bugs
This commit is contained in:
parent
9078fe6f65
commit
0b9a8687e6
|
|
@ -126,7 +126,7 @@ final class SystemUtils
|
|||
return -1;
|
||||
}
|
||||
|
||||
$cpuUsage = $loadavg[0] * 100 / $nproc;
|
||||
$cpuUsage = ((float) ($loadavg[0] ?? 0.0)) * 100 / $nproc;
|
||||
}
|
||||
|
||||
return (int) $cpuUsage;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user