fix cpu usage bugs

This commit is contained in:
Dennis Eichhorn 2023-09-21 03:13:48 +00:00
parent 9078fe6f65
commit 0b9a8687e6

View File

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