New to Profiling

Hi all,

I'm relatively new to profiling, so I am in need of guidance!

Here's the scenario:

We currently have JVM instances running on several servers. I want to gather information about the JVMs, such as initial memory footprints, what parameters are used for JVM startup, are the JVMs running in server or client modes, performance of the JVMs, etc.

Can anyone give me some direction to go on? I am looking for open-source tools, or even coding my own tool (which would be even better). Are there any APIs that help with this?

I appreciate your help.

[599 byte] By [CupOfJoea] at [2007-11-27 0:29:12]
# 1

Depending on JVM version you have plenty of tools. Thre's no need to "reinvent the wheel".

Try these links first:

1.-http://java.sun.com/performance/jvmstat (you can use jvmstat with JVM 1.4.2)

2.-http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html

Or if you like the DIY hard way use:

http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/

david327a at 2007-7-11 22:31:21 > top of Java-index,Core,Monitoring & Management...
# 2

The JVMTI is one option, but it's definitely the hardest one (but still it's the best option if you want to write a very fast debugger/profiler and you don't mind writing in low level C/C++ and to use Java Native Interface - JNI). You can also use JDWP framework if you want to use any language you want (it operates on TCP/IP chunks), or finally JDI, which is designed to easily write debugging/profiling apps in pure Java.

You can find some information about debugging frameworks in the JPDA Overview:

http://java.sun.com/javase/6/docs/technotes/guides/jpda/

However be warned that there is currently no way to access the operand stack of the current frame with any layer of JPDA. This will be probably fixed in JVM 7, but giving the fact that JVM 6 had it's premiere not long time ago, we will wait some more time for version 7...

antkowya at 2007-7-11 22:31:21 > top of Java-index,Core,Monitoring & Management...