Bug 48220

GemStone/S 64 Bit

3.7.1, 3.7, 3.6.8, 3.6.7, 3.6.6, 3.6.5, 3.6.4, 3.6.3, 3.6.2, 3.6.1, 3.6, 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4, 3.3.9, 3.3.8, 3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3, 3.2.16, 3.2.15, 3.2.14, 3.2.13, earlier versions

3.5.1, 3.4.4

Invalid results from System>>hostCpuUsage

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