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