jmx-dev RFR: 8265104: CpuLoad and SystemCpuLoad in OperatingSystem MXBean returns -1.0 [v2]
David Holmes
dholmes at openjdk.java.net
Wed Apr 14 02:53:59 UTC 2021
On Tue, 13 Apr 2021 06:55:20 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> I got -1.0 from both CpuLoad and SystemCpuLoad in OperatingSystem MXBean when I run the application on Fedora 33 x64 which is installed cgroups V2.
>>
>> 
>>
>> I do not run the application in the container, nor do not run with resource limitation on cgroups, so JMX should report CPU load on host value in this case.
>
> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>
> Return host CPU load directly from getCpuLoad()
Thanks Yasumasa, this seems a much better approach.
David
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3447
More information about the jmx-dev
mailing list