The method System>>hostCpuUsage returns an Array of integers describing the percent active, idle, user, system, and I/O wait.
In versions earlier than v3.4.4/v3.5.1, the return values on some platforms may have been entirely 0, or a set of values that did not add up to 100. This was due to incorrect rounding in the calculations.
Note that the first call to this within a gem, and back-to-back calls, provide invalid results (entirely idle CPU) on some platforms. On Linux, hostCpuUsage is based on reading files in /proc. For calls that are too close together, the kernel will not have updated the statistics information; you will need to wait 10ms-100ms between calls to get valid CPU usage numbers.
Last updated: 1/17/20