IBM Support

IJ02225: OPERATINGSYSTEMMXBEAN: GETPROCESSCPULOAD() AND GETPROCESSCPUTIMEBYNS() RETURN INCORRECT RESULTS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: N/A
    .
    Stack Trace: N/A
    .
    OperatingSystemMXBean.getProcessCpuLoad() and
    OperatingSystemMXBean.getProcessCpuTimeByNS() return incorrect
    results.
    

Local fix

  • Setting system property
    "com.ibm.lang.management.OperatingSystemMXBean.isCpuTime100ns"
    to "true" fixes this issue.
    

Problem summary

  • OperatingSystemMXBean.getProcessCpuLoad() and
    OperatingSystemMXBean.getProcessCpuTimeByNS() return incorrect
    values which are scaled by a factor of 100.
    

Problem conclusion

  • OperatingSystemMXBean.getProcessCpuLoad() and
    OperatingSystemMXBean.getProcessCpuTimeByNS() are dependent upon
    OperatingSystemMXBean.getProcessCpuTime(). Recently, the API
    definition of OperatingSystemMXBean.getProcessCpuTime() changed.
    Before, it returned CPU time in 100 nanosecond units. Now, it
    returns CPU time in nanoseconds by default but it can also
    return CPU time in 100 nanosecond units when the system property
    "com.ibm.lang.management.OperatingSystemMXBean.isCpuTime100ns"
    is to set "true". The implementation of
    OperatingSystemMXBean.getProcessCpuLoad() and
    OperatingSystemMXBean.getProcessCpuTimeByNS() has been updated
    to account for the change in the API definition of
    OperatingSystemMXBean.getProcessCpuTime().
    .
    This APAR will be fixed in the following Java Releases:
       8    SR5 FP5   (8.0.5.5)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ02225

  • Reported component name

    J9 COMMON CODE

  • Reported component ID

    620700127

  • Reported release

    270

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-11-28

  • Closed date

    2017-11-28

  • Last modified date

    2017-11-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    J9 COMMON CODE

  • Fixed component ID

    620700127

Applicable component levels

  • R270 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
22 February 2022