The first is a step towards the converged HotRockit JVM with the release of jcmd which is the HotRockit version of JRockit's jrcmd.
The second is G1 is now a supported Garbage collector. We'll be doing another blog post to introduce you to G1.
Jcmd can be used to send diagnostic commands to a JVM e.g. jcmd without any command line parameters lists the running JVMs on the host
jcmd
10500 org.netbeans.Main --userdir /home/steve/.netbeans/7.1.2 --branding nb
11201 sun.tools.jcmd.JCmd
To find out what commands you can use on the JVM you just add PID and help
jcmd 10500 help
The following commands are available:
VM.commercial_features
ManagementAgent.stop
ManagementAgent.start_local
ManagementAgent.start
Thread.print
GC.class_histogram
GC.heap_dump
GC.run_finalization
GC.run
VM.uptime
VM.flags
VM.system_properties
VM.command_line
VM.version
help
So to get a thread dump run.
jcmd 10500 Thread.print
To get more details on a command just run help followed by the command name.
jcmd 10500 help Thread.print
Print all threads with stacktraces.
Impact: Medium: Depends on the number of threads.
Syntax : Thread.print [options]
Options: (options must be specified using the <key> or <key>=<value> syntax)
-l : [optional] print java.util.concurrent locks (BOOLEAN, false)
Strangely one of the most useful commands is given to you in the command list. To see a lot of diagnostic information use this magic command line.
jcmd 10500 PerfCounter.print
java.ci.totalTime=60737504
java.cls.loadedClasses=11815
java.cls.sharedLoadedClasses=0
java.cls.sharedUnloadedClasses=0
java.cls.unloadedClasses=0
java.property.java.class.path="/home/steve/netbeans-7.1.2/platform/lib/boot.jar:/home/steve/netbeans-7.1.2/platform/lib/org-openide-modules.jar:/home/steve/netbeans-7.1.2/platform/lib/org-openide-util.jar:/home/steve/netbeans-7.1.2/platform/lib/org-openide-util-lookup.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/boot_ja.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/boot_pt_BR.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/boot_ru.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/boot_zh_CN.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/org-openide-modules_ja.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/org-openide-modules_pt_BR.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/org-openide-modules_ru.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/org-openide-modules_zh_CN.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/org-openide-util_ja.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/org-openide-util-lookup_ja.jar:/home/steve/netbeans-7.1.2/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/home/st"
java.property.java.endorsed.dirs="/usr/local/java/jdk1.7.0_04/jre/lib/endorsed"
java.property.java.ext.dirs="/usr/local/java/jdk1.7.0_04/jre/lib/ext:/usr/java/packages/lib/ext"
java.property.java.home="/usr/local/java/jdk1.7.0_04/jre"
java.property.java.library.path="/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib"
java.property.java.version="1.7.0_04"
java.property.java.vm.info="mixed mode"
java.property.java.vm.name="Java HotSpot(TM) 64-Bit Server VM"
java.property.java.vm.specification.name="Java Virtual Machine Specification"
java.property.java.vm.specification.vendor="Oracle Corporation"
java.property.java.vm.specification.version="1.7"
java.property.java.vm.vendor="Oracle Corporation"
java.property.java.vm.version="23.0-b21"
java.rt.vmArgs="-Djdk.home=/usr/local/java/jdk1.7.0_04 -Dnetbeans.system_http_proxy=DIRECT -Dnetbeans.system_http_non_proxy_hosts= -Dnetbeans.dirs=/home/steve/netbeans-7.1.2/nb:/home/steve/netbeans-7.1.2/ergonomics:/home/steve/netbeans-7.1.2/ide:/home/steve/netbeans-7.1.2/java:/home/steve/netbeans-7.1.2/apisupport:/home/steve/netbeans-7.1.2/bin/../webcommon:/home/steve/netbeans-7.1.2/websvccommon:/home/steve/netbeans-7.1.2/enterprise:/home/steve/netbeans-7.1.2/mobility:/home/steve/netbeans-7.1.2/profiler:/home/steve/netbeans-7.1.2/bin/../python:/home/steve/netbeans-7.1.2/php:/home/steve/netbeans-7.1.2/bin/../identity:/home/steve/netbeans-7.1.2/harness:/home/steve/netbeans-7.1.2/cnd:/home/steve/netbeans-7.1.2/dlight:/home/steve/netbeans-7.1.2/groovy:/home/steve/netbeans-7.1.2/extra:/home/steve/netbeans-7.1.2/bin/../javacard:/home/steve/netbeans-7.1.2/javafx: -Dnetbeans.home=/home/steve/netbeans-7.1.2/platform -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -Dnetbeans.accept_license_class=org.netbeans.license.AcceptLic"
java.rt.vmFlags=""
java.threads.daemon=20
java.threads.live=27
java.threads.livePeak=35
java.threads.started=47
sun.ci.compilerThread.0.compiles=1232
sun.ci.compilerThread.0.method=""
sun.ci.compilerThread.0.time=1866
sun.ci.compilerThread.0.type=1
sun.ci.compilerThread.1.compiles=1144
sun.ci.compilerThread.1.method=""
sun.ci.compilerThread.1.time=1610
sun.ci.compilerThread.1.type=1
sun.ci.lastFailedMethod="org/openide/filesystems/MultiFileObject getAttribute"
sun.ci.lastFailedType=1
sun.ci.lastInvalidatedMethod=""
sun.ci.lastInvalidatedType=0
sun.ci.lastMethod="java/lang/ThreadLocal$ThreadLocalMap access$000"
sun.ci.lastSize=141
sun.ci.lastType=1
sun.ci.nmethodCodeSize=4148000
sun.ci.nmethodSize=8743840
sun.ci.osrBytes=64203
sun.ci.osrCompiles=89
sun.ci.osrTime=5024812
sun.ci.standardBytes=840902
sun.ci.standardCompiles=2285
sun.ci.standardTime=55712692
sun.ci.threads=2
sun.ci.totalBailouts=2
sun.ci.totalCompiles=2374
sun.ci.totalInvalidates=0
sun.classloader.findClassTime=151493335
sun.classloader.findClasses=308
sun.classloader.parentDelegationTime=27685368
sun.cls.appClassBytes=30529224
sun.cls.appClassLoadCount=18612
sun.cls.appClassLoadTime=5354419
sun.cls.appClassLoadTime.self=2631465
sun.cls.classInitTime=3017440
sun.cls.classInitTime.self=2090710
sun.cls.classLinkedTime=4171642
sun.cls.classLinkedTime.self=451052
sun.cls.classVerifyTime=3694112
sun.cls.classVerifyTime.self=1825134
sun.cls.defineAppClassTime=2918455
sun.cls.defineAppClassTime.self=383466
sun.cls.defineAppClasses=7304
sun.cls.initializedClasses=9103
sun.cls.isUnsyncloadClassSet=0
sun.cls.jniDefineClassNoLockCalls=21
sun.cls.jvmDefineClassNoLockCalls=491
sun.cls.jvmFindLoadedClassNoLockCalls=15384
sun.cls.linkedClasses=10323
sun.cls.loadInstanceClassFailRate=0
sun.cls.loadedBytes=27363520
sun.cls.lookupSysClassTime=101124
sun.cls.methodBytes=16763264
sun.cls.nonSystemLoaderLockContentionRate=31
sun.cls.parseClassTime=3304476
sun.cls.parseClassTime.self=2556431
sun.cls.sharedClassLoadTime=6391
sun.cls.sharedLoadedBytes=0
sun.cls.sharedUnloadedBytes=0
sun.cls.sysClassBytes=16453471
sun.cls.sysClassLoadTime=1109618
sun.cls.systemLoaderLockContentionRate=0
sun.cls.time=10265208
sun.cls.unloadedBytes=0
sun.cls.unsafeDefineClassCalls=130
sun.cls.verifiedClasses=10316
sun.gc.cause="No GC"
sun.gc.collector.0.invocations=22
sun.gc.collector.0.lastEntryTime=999097260
sun.gc.collector.0.lastExitTime=999134881
sun.gc.collector.0.name="PSScavenge"
sun.gc.collector.0.time=939541
sun.gc.collector.1.invocations=3
sun.gc.collector.1.lastEntryTime=32442971
sun.gc.collector.1.lastExitTime=33058011
sun.gc.collector.1.name="PSParallelCompact"
sun.gc.collector.1.time=1213023
sun.gc.generation.0.capacity=261619712
sun.gc.generation.0.maxCapacity=268435456
sun.gc.generation.0.minCapacity=11141120
sun.gc.generation.0.name="new"
sun.gc.generation.0.space.0.capacity=176685056
sun.gc.generation.0.space.0.initCapacity=0
sun.gc.generation.0.space.0.maxCapacity=268304384
sun.gc.generation.0.space.0.name="eden"
sun.gc.generation.0.space.0.used=35454096
sun.gc.generation.0.space.1.capacity=39583744
sun.gc.generation.0.space.1.initCapacity=0
sun.gc.generation.0.space.1.maxCapacity=89456640
sun.gc.generation.0.space.1.name="s0"
sun.gc.generation.0.space.1.used=13662136
sun.gc.generation.0.space.2.capacity=42467328
sun.gc.generation.0.space.2.initCapacity=0
sun.gc.generation.0.space.2.maxCapacity=89456640
sun.gc.generation.0.space.2.name="s1"
sun.gc.generation.0.space.2.used=0
sun.gc.generation.0.spaces=3
sun.gc.generation.1.capacity=157745152
sun.gc.generation.1.maxCapacity=536870912
sun.gc.generation.1.minCapacity=22413312
sun.gc.generation.1.name="old"
sun.gc.generation.1.space.0.capacity=157745152
sun.gc.generation.1.space.0.initCapacity=22413312
sun.gc.generation.1.space.0.maxCapacity=536870912
sun.gc.generation.1.space.0.name="old"
sun.gc.generation.1.space.0.used=123354576
sun.gc.generation.1.spaces=1
sun.gc.generation.2.capacity=96272384
sun.gc.generation.2.maxCapacity=402653184
sun.gc.generation.2.minCapacity=33554432
sun.gc.generation.2.name="perm"
sun.gc.generation.2.space.0.capacity=96272384
sun.gc.generation.2.space.0.initCapacity=33554432
sun.gc.generation.2.space.0.maxCapacity=402653184
sun.gc.generation.2.space.0.name="perm"
sun.gc.generation.2.space.0.used=78509080
sun.gc.generation.2.spaces=1
sun.gc.lastCause="Allocation Failure"
sun.gc.policy.avgBaseFootprint=322928064
sun.gc.policy.avgMajorIntervalTime=11013
sun.gc.policy.avgMajorPauseTime=403
sun.gc.policy.avgMinorIntervalTime=241018
sun.gc.policy.avgMinorPauseTime=49
sun.gc.policy.avgOldLive=58781140
sun.gc.policy.avgPretenuredPaddedAvg=0
sun.gc.policy.avgPromotedAvg=5992504
sun.gc.policy.avgPromotedDev=4712275
sun.gc.policy.avgPromotedPaddedAvg=20129328
sun.gc.policy.avgSurvivedAvg=17011000
sun.gc.policy.avgSurvivedDev=8481945
sun.gc.policy.avgSurvivedPaddedAvg=42456836
sun.gc.policy.avgYoungLive=12273146
sun.gc.policy.boundaryMoved=0
sun.gc.policy.changeOldGenForMajPauses=0
sun.gc.policy.changeOldGenForMinPauses=0
sun.gc.policy.changeYoungGenForMajPauses=0
sun.gc.policy.changeYoungGenForMinPauses=0
sun.gc.policy.collectors=2
sun.gc.policy.decideAtFullGc=0
sun.gc.policy.decreaseForFootprint=0
sun.gc.policy.decrementTenuringThresholdForGcCost=0
sun.gc.policy.decrementTenuringThresholdForSurvivorLimit=0
sun.gc.policy.desiredSurvivorSize=42467328
sun.gc.policy.edenSize=176685056
sun.gc.policy.freeSpace=203948032
sun.gc.policy.fullFollowsScavenge=0
sun.gc.policy.gcTimeLimitExceeded=0
sun.gc.policy.generations=3
sun.gc.policy.increaseOldGenForThroughput=0
sun.gc.policy.increaseYoungGenForThroughput=5
sun.gc.policy.incrementTenuringThresholdForGcCost=1
sun.gc.policy.liveAtLastFullGc=103176440
sun.gc.policy.liveSpace=393982368
sun.gc.policy.majorCollectionSlope=2
sun.gc.policy.majorGcCost=3
sun.gc.policy.majorPauseOldSlope=31553
sun.gc.policy.majorPauseYoungSlope=-1567
sun.gc.policy.maxTenuringThreshold=15
sun.gc.policy.minorCollectionSlope=0
sun.gc.policy.minorGcCost=2
sun.gc.policy.minorPauseOldSlope=1985
sun.gc.policy.minorPauseTime=37
sun.gc.policy.minorPauseYoungSlope=290
sun.gc.policy.mutatorCost=93
sun.gc.policy.name="ParScav:MSC"
sun.gc.policy.oldCapacity=157745152
sun.gc.policy.oldEdenSize=177471488
sun.gc.policy.oldPromoSize=27262976
sun.gc.policy.promoSize=27262976
sun.gc.policy.promoted=5797888
sun.gc.policy.scavengeSkipped=0
sun.gc.policy.survived=13662136
sun.gc.policy.survivorOverflowed=0
sun.gc.policy.tenuringThreshold=2
sun.gc.policy.youngCapacity=214040576
sun.gc.tlab.alloc=4707728
sun.gc.tlab.allocThreads=12
sun.gc.tlab.fastWaste=0
sun.gc.tlab.fills=1010
sun.gc.tlab.gcWaste=569422
sun.gc.tlab.maxFastWaste=0
sun.gc.tlab.maxFills=642
sun.gc.tlab.maxGcWaste=423657
sun.gc.tlab.maxSlowAlloc=116
sun.gc.tlab.maxSlowWaste=7649
sun.gc.tlab.slowAlloc=119
sun.gc.tlab.slowWaste=10849
sun.management.JMXConnectorServer.address="service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc0AAtVbmljYXN0UmVmMgAACTEyNy4wLjEuMQAA1Ecfi5CSQlntqSthk/UAAAE2+eGu+YABAHg="
sun.os.hrt.frequency=1000000
sun.os.hrt.ticks=1689781092
sun.perfdata.majorVersion=2
sun.perfdata.minorVersion=0
sun.perfdata.overflow=0
sun.perfdata.size=32768
sun.perfdata.timestamp=149619060
sun.perfdata.used=19360
sun.property.sun.boot.class.path="/usr/local/java/jdk1.7.0_04/jre/lib/resources.jar:/usr/local/java/jdk1.7.0_04/jre/lib/rt.jar:/usr/local/java/jdk1.7.0_04/jre/lib/sunrsasign.jar:/usr/local/java/jdk1.7.0_04/jre/lib/jsse.jar:/usr/local/java/jdk1.7.0_04/jre/lib/jce.jar:/usr/local/java/jdk1.7.0_04/jre/lib/charsets.jar:/usr/local/java/jdk1.7.0_04/jre/lib/jfr.jar:/usr/local/java/jdk1.7.0_04/jre/classes"
sun.property.sun.boot.library.path="/usr/local/java/jdk1.7.0_04/jre/lib/amd64"
sun.rt._sync_ContendedLockAttempts=3744
sun.rt._sync_Deflations=5554
sun.rt._sync_EmptyNotifications=0
sun.rt._sync_FailedSpins=0
sun.rt._sync_FutileWakeups=244
sun.rt._sync_Inflations=6026
sun.rt._sync_MonExtant=1536
sun.rt._sync_MonInCirculation=0
sun.rt._sync_MonScavenged=0
sun.rt._sync_Notifications=71916
sun.rt._sync_Parks=73472
sun.rt._sync_PrivateA=0
sun.rt._sync_PrivateB=0
sun.rt._sync_SlowEnter=0
sun.rt._sync_SlowExit=0
sun.rt._sync_SlowNotify=0
sun.rt._sync_SlowNotifyAll=0
sun.rt._sync_SuccessfulSpins=0
sun.rt.applicationTime=1525291780
sun.rt.createVmBeginTime=1335632029340
sun.rt.createVmEndTime=1335632029409
sun.rt.internalVersion="Java HotSpot(TM) 64-Bit Server VM (23.0-b21) for linux-amd64 JRE (1.7.0_04-b20), built on Apr 12 2012 01:59:40 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)"
sun.rt.interruptedBeforeIO=0
sun.rt.interruptedDuringIO=0
sun.rt.javaCommand="org.netbeans.Main --userdir /home/steve/.netbeans/7.1.2 --branding nb"
sun.rt.jvmCapabilities="1000000000000000000000000000000000000000000000000000000000000000"
sun.rt.jvmVersion=385875989
sun.rt.safepointSyncTime=1147436
sun.rt.safepointTime=3672541
sun.rt.safepoints=1924
sun.rt.threadInterruptSignaled=0
sun.rt.vmInitDoneTime=1335632029391
sun.threads.vmOperationTime=2413517
sun.urlClassLoader.readClassBytesTime=32050788
sun.zip.zipFile.openTime=918299653
sun.zip.zipFiles=6294