Archived: Running JRockit JVM with Management Console

This section provides a tutorial example on use JRockit Management Console server and client components to collect runtime data from the JRockit JVM.

JRockit JVM Management Console has two components:

The client component has a GUI that allows you to establish a connection to a running server component by an IP port, and display real-time information collected from that server component.

Let's use the following simple program to see how the Management Console works:

/**
 * LongWhile.java
 * Copyright (c) 2002, HerongYang.com, All Rights Reserved.
 */
class LongWhile {
   public static void main(String[] a) {
      Runtime rt = Runtime.getRuntime();
      System.out.println(" Free memory: " + rt.freeMemory());
      System.out.println("Total memory: " + rt.totalMemory());
      while (true);
   }
}

Compile this program with J2SDK 1.4.0_02 and run it in JRockit JVM with the Management Console server component turned on:

herong> \progra~1\jrockit\7.0\1.4.0\bin\java -cp .
   "-Djrockit.managementserver=true" LongWhile
[JRockit] Management Server started on port 7090.
 Free memory: 62665048
Total memory: 73363465

Now my sample application is running in JRockit JVM with the Management Console server turned on ready to export information on port 7090.

Use the following command to run the JRockit Management Console client component:

herong> cd \progra~1\jrockit\7.0\1.4.0\console
herong> ..\bin\java -jar ManagementConsole.jar

Unfortunately, this command crashed my laptop system immediate. The crash was so bad, that I had to remove the external power and the battery to restart the system. This happened twice. But it worked on my desktop system. The biggest difference of my desktop is the physical memory size: 256M (128M more than my laptop system).

Once the console client component started, I was able to connect to my running sample application. The UI of the client component was cool, and easy to use. So I collected the following information about my running program:

LongWhile run time object report:
    Free memory: 62665048
   Total memory: 73363465

JRockit management console report:
    Free memory:  41523K
   Total memory: 260332K

      Free heap:  60664K
     Total heap:  71644K

Window 2000 task manage report:
         LongWhile process memory: 14840K
   JRockit console process memory: 49180K

While watching at the console window, I noticed a couple of interesting things:

I repeated the test, and got the same crash. I guess JRockit 7.0 is not good for my system configuration.

Table of Contents

 About This Book

 JVM (Java Virtual Machine) Specification

 Java HotSpot VM - JVM by Oracle/Sun

 java.lang.Runtime Class - The JVM Instance

 java.lang.System Class - The Operating System

 ClassLoader Class - Class Loaders

 Class Class - Class Reflections

 JVM Runtime Data Areas

 JVM Stack, Frame and Stack Overflow

 Thread Testing Program and Result

 CPU Impact of Multi-Thread Applications

 I/O Impact of Multi-Thread Applications

 CDS (Class Data Sharing)

 Micro Benchmark Runner and JVM Options

 Micro Benchmark Tests on "int" Operations

 Micro Benchmark Tests on "long" Operations

 Micro Benchmark Tests in JIT Compilation Mode

 Micro Benchmark Tests on "float" and "double" Operations

 OpenJ9 by Eclipse Foundation

 JRockit JVM 28.2.7 by Oracle Corporation

Archived Tutorials

 archived: Download and Install JDK 14 on macOS

 Archived: Download and Install Latest JDK 10 on Windows

 Archived: Download and Install JDK 1.8.0 on Windows

 Archived: Download and Install JDK 1.7.0 on Windows

 Archived: Download and Install Java SE 1.6 Update 2

 Archived: Installing JRockit JVM 8.0

 Archived: Testing with LongWhile.java

 Archived: Testing with LongSleep.java

 Archived: GCTest.java - Garbage Collection Test Program

 Archived: GC Test - Constant Memory Requirement

 Archived: GC Test - Periodical Memory Requirement

 Archived: GC Test - Releasing Old vs. New Objects

 Archived: GC Test - JDK 1.4.0 vs. JDK 1.3.1

 Archived: GC Test - Client vs. Server

 Archived: StringBuffer Testing Program

 Archived: Installing JRockit JVM 7.0

Archived: Running JRockit JVM with Management Console

 References

 Full Version in PDF/EPUB