Saturday Apr 05, 2008

Using JConsole

Using the jconsole tool
J2SE 5.0 has comprehensive monitoring and management support. Among the tools
included in the JDK download is a Java Management Extensions (JMX)-compliant monitoring
tool called jconsole. The tool uses the built-in JMX instrumentation in the Java Virtual
Machine to provide information on performance and resource consumption of running
applications. Although the tool is included in the JDK download it can also be used to monitor
and manage applications deployed with the Java 2 Platform Standard Edition Runtime
Environment 5.0 (JRE 5.0).
Jconsole can attach to any application that is started with the JMX agent. A system property
defined on the command line enables the JMX agent. Once attached jconsole can be used to
display useful information such as thread usage, memory consumption, and details about
class loading, runtime compilation, and the operating system.




Figure jconsole Summary tab
The Summary tab provides the following information
– Uptime: how long the JVM has been running
– Total compile time: the amount of time spent in runtime compilation
– Process CPU time: the total amount of CPU time consumed by the JVM

Figure jconsole Memory tab
The Memory tab shown in above Figure provides the following information.
– Current heap size: Number of Kbytes currently occupied by the heap
– Committed memory: Total amount of memory allocated for use by the heap
– Maximum heap size: Maximum number of Kbytes occupied by the heap
– Objects pending for finalization: Number of objects pending for finalization
– Garbage collector information: Information on GC, including the garbage collector
names, number of collections performed, and total time spent performing GC
A view of the memory pictured in above Figure shows two events of interest. At
02:20 a garbage collection was triggered from the Jconsole tool. At 02:50 an
OutOfMemoryError was thrown by an application.

Figure jconsole Threads tab

Figure Thread detail

The Threads tab shown in above Figure provides the following information.
– Live threads: Current number of live daemon threads plus non-daemon threads
– Peak: Highest number of live threads since JVM started
– Daemon threads: Current number of live daemon threads
– Total started: Total number of threads started since the JVM started (including
daemon, nondaemon, and terminated)
The Classes tab provides the following information.
– Current classes loaded: Number of classes currently loaded into memory

– Total classes loaded: Total number of classes loaded into memory since the JVM
started, including those subsequently unloaded
– Total classes unloaded: Number of classes unloaded from memory since the JVM
started

Figure jconsole VM tab
The VM tab shown in above Figure provides the following information.
– JVM type and version
– Uptime
– VM command line arguments
– Class, Library, and Boot Class paths
– JIT Compiler
– Operating System information
In addition to monitoring, jconsole can be used to dynamically change several parameters in
the running system. For example, the setting of the -verbose:gc option can be changed so
that garbage collection trace output can be dynamically enabled or disabled for a running
application. You can also perform a GC by clicking the Perform GC button on the Memory
tab.
Getting started with jconsole
1. Start the application with the -Dcom.sun.management.jmxremote option. This option sets
the com.sun.management.jmxremote system property which enabled the JMX agent.
2. Start Jconsole with the jconsole command. Jconsole ships as a binary in the
$JAVA_HOME/bin directory. (JAVA_HOME indicates the home directory of the J2SE
installation. For example, /opt/IBM/WebSphere/AppServer/java/bin)

Figure Jconsole Connect to Agent dialog box
3. When Jconsole starts it shows a window with the list of managed VMs on the machine as
shown in Figure 9-12. The process-id (pid) and command line arguments for each VM are
printed. Select a VM, click Connect, and Jconsole will attach to it.
For more information on the monitoring and management features, and details on how to use
Jconsole, read the following document.
http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html

Wednesday Feb 27, 2008

Netbeans and Clearcase: versioning support in Netbeans

Sometime back we started the early work for ClearCase plugin along with the VCS team and now this has been in BETA. I am sure people is going to like this plugin as it looks really great and it maintains the consistency across the other versioning system. Even if the ClearCase is such a complicated software it will give you really simple, easy and intuitive action menu. If you have used any other versioning plugin from NB then your experience would remain the same. I would invite you to try this plugin and send your feedback to NB Engg so future enhancement can be made available to users.
There are couple of places you can check the details and they are as:
http://versioncontrol.netbeans.org/clearcase/
Roumens's Blog on ClearCase plugin

And if you would like to provide feedback don't forget to visit:
http://blogs.sun.com/roumen/entry/looking_for_feedback_on_new

Thursday Feb 21, 2008

Netbeans 6.1 plugin for WebSphere V6.0 and V6.1

Together with my colleagues we worked on the plugin for Netbeans IDE for WebSphere. It was initially designed to work for Netbeans 5.x IDE and WebSphere Application Server 6.0. We did some work to make it available with Netbeans 6.0 and it was at update center for some time but it should be part of the main binary. Recently I have been continuing this plugin work with my team member and I am happy to share that it is available as Netbeans 6.1 Milestone 1 release. The current phase of port is done and if you are interested you can download the plugin from here. The details can be found at Milestone 1 report page and WebSphere plugin screen shots are there for your reference.
The next step would be to add more functionality as you would like. Just provide us feedback at the plugin web-site.

About

dkumar

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today