jvm.add("memory", mem);
// JMX properties -- probably should be moved to a different handler
SimpleOrderedMap<Object> jmx = new SimpleOrderedMap<Object>();
try{
RuntimeMXBean mx = ManagementFactory.getRuntimeMXBean();
jmx.add( "bootclasspath", mx.getBootClassPath());
jmx.add( "classpath", mx.getClassPath() );
// the input arguments passed to the Java virtual machine
// which does not include the arguments to the main method.
jmx.add( "commandLineArgs", mx.getInputArguments());
// a map of names and values of all system properties.
//jmx.add( "SYSTEM PROPERTIES", mx.getSystemProperties());
jmx.add( "startTime", new Date(mx.getStartTime()));
jmx.add( "upTimeMS", mx.getUptime() );
}
catch (Exception e) {
log.warn("Error getting JMX properties", e);
}
jvm.add( "jmx", jmx );