public static void init(){
  OperatingSystemMXBean osStatsBean=ManagementFactory.getOperatingSystemMXBean();
  if (osStatsBean instanceof UnixOperatingSystemMXBean) {
    stats=((UnixOperatingSystemMXBean)osStatsBean);
  }
 else {
    throw new RuntimeException("Unexpected OperatingSystemMXBean " + osStatsBean);
  }
  memoryStats=ManagementFactory.getMemoryMXBean();
}

public static void init ( ) { OperatingSystemMXBean osStatsBean = ManagementFactory . getOperatingSystemMXBean ( ) ; if ( osStatsBean instanceof UnixOperatingSystemMXBean ) { stats = ( ( UnixOperatingSystemMXBean ) osStatsBean ) ; } else { throw new RuntimeException ( "Unexpected OperatingSystemMXBean " + osStatsBean ) ; } memoryStats = ManagementFactory . getMemoryMXBean ( ) ; }
initializes system metrics internals .
