Sunday, September 2, 2007

Java 1.5 - Application Memory Monitoring Made Easy

There is a new tool called Java Monitoring & Management Console in 1.5 edition of J2SE (available as %JDK_HOME%\bin\jconsole.exe). Simply set
JAVA_OPTS=-Dcom.sun.management.jmxremote

and start your Application Server or Servlet Container. Launch JConsole tool, and when asked for attaching, pick the appropriate process to attach.

[Pic 1 - Choose a Process to attach to.]

[Pic 2 - JConsole in Action]

I have a JDK 1.6 on W2K machine.

Here is a link from Sun's Java website.


AdvertisementAmazon.com Textbooks

3 comments:

Rockstar said...

This is interesting but not really much more than what existing OS tools can do. What I'm still waiting for is an easy way to check per object memory usage without latching JProfiler into the mix. That would be a dream.

sandeep said...

@Rockstar.
Try the netbeans profiler or if you have resources to buy, yourkit profiler is a very good java profiler. you can try the software for 15 days.
Netbeans profiler is pretty good and should do most of your tasks

Anonymous said...

Rockstar: That not really true. OS tools cannot show the Java program, only the virtual machine as a whole, so they are of very limited use.

Total Pageviews

Reading List - 05-Mar-23

Talking to #AI may be the most important job skill of this century ( JohnGoodPasture ) Role of account management over the years. It’s a ro...