load average calculation failing
Jon Turney
jon.turney@dronecode.org.uk
Mon May 9 11:29:57 GMT 2022
On 08/05/2022 08:01, Mark Geisert wrote:
> Mark Geisert wrote (on the main Cygwin mailing list):
>> I've recently noticed that the 'xload' I routinely run shows zero load
>> even with compute-bound processes running. This is on both Cygwin
>> pre-3.4.0 as well as 3.3.4. A test program, shown below, indicates
>> that getloadavg() is returning with 0 status, i.e. not an error but no
>> elems
>> of the passed-in array updated.
>>
One other thing I forgot to mention: xload doesn't call getloadavg(), it
directly uses the PDH interface, see:
https://gitlab.freedesktop.org/xorg/app/xload/-/blob/master/get_load.c#L71
More information about the Cygwin-developers
mailing list