title: 'SystemCpuLoad' for System CPU usage coming different if called from different JVMS
body: <p>I have two JVM's where one JVM(JVM 1) is lightweight and another JVM (JVM 2) does heavy tasks. When I try to get System usage from JVM's by fetching 'SystemCpuLoad', JVM 1 is giving correct CPU values (matching SAR values) and another JVM which does heavy work is giving high CPU usage not matching SAR values.
  Followed the below approach :</p>
  <pre><code>final ObjectName mapMBeanName = new ObjectName( &quot;java.lang:type=OperatingSystem&quot; );
  MBeanServer server = ManagementFactory.getPlatformMBeanServer();
  cpu =100.0 * Float.parseFloat( server.getAttribute( mapMBeanName, &quot;SystemCpuLoad&quot; ).toString() );
  </code></pre>
  <p>Can anyone help me how can I get correct System CPU usage irrespective of whether the JVM process does the heavy task or lighter task?</p>