Outdated: 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:

\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:

cd \progra~1\jrockit\7.0\1.4.0\console
..\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.

Last update: 2002.

Table of Contents

 About This Book

 Downloading and Installing JDK 1.8.0 on Windows

 Downloading and Installing JDK 1.7.0 on Windows

 java.lang.Runtime Class - The JVM Instance

 java.lang.System Class - The Operating System

 ClassLoader Class - Class Loaders

 Class Class - Class Reflections

 Sun's JVM - Java HotSpot VM

 JRockit JVM 28.2.7 by Oracle Corporation

 JVM Runtime Data Areas

 Memory Management and Garbage Collectors

 Garbage Collection Tests

 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

Outdated Tutorials

 Outdated: Download and Install Java SE 1.6 Update 2

 Outdated: Installing JRockit JVM 8.0

 Outdated: Testing with LongWhile.java

 Outdated: Testing with LongSleep.java

 Outdated: GCTest.java - Garbage Collection Test Program

 Outdated: GC Test - Constant Memory Requirement

 Outdated: GC Test - Periodical Memory Requirement

 Outdated: GC Test - Releasing Old vs. New Objects

 Outdated: GC Test - JDK 1.4.0 vs. JDK 1.3.1

 Outdated: GC Test - Client vs. Server

 Outdated: StringBuffer Testing Program

 Outdated: Installing JRockit JVM 7.0

Outdated: Running JRockit JVM with Management Console

 References

 PDF Printing Version