3 Replies Latest reply: Jun 22, 2014 11:54 AM by Staffan Larsen-Oracle RSS

    Serviceability API



               I don't know any forum that discusses serviceability  implementation ideas. So I am asking some questions here.

      1. What are the various type serviceability API's that will be supported in the future ? I have used JVMTI and JMX and some more are mentioned in http://hirt.se/blog/. The attach API mentioned here uses diagnostic commands. Is there a list of all such commands ?

      2. I use JVMTI like this.

             VM vm = VM.getVM();

             Universe universe = vm.getUniverse();

              CollectedHeap heap = universe.heap();

              if (heap instanceof ParallelScavengeHeap) {

                  ParallelScavengeHeap psHeap = (ParallelScavengeHeap) heap;

                  PSYoungGen y = psHeap.youngGen();

                  MutableSpace youngObjSpace = y.edenSpace();

                  youngCapacity = youngObjSpace.capacity();




           JVM 1 attaches to JVM 2. Which JVM executes this code ? Can I create an agent or JMX bean in JVM 2 that uses this code and call it from JVM 1 using JMX ? I am aware the JMX itself

      can give me memory data separately ?

      3. Is  the JMC code freely available for inclusion in another OSS project ? Is JMC or any other API reactive so that the events produced by the JVM(perf. counters ?) trigger the listeners ?