Monitoring the performance of a JVM

S

silarri

Hi everybody,

I am trying to determine which is the best way of monitoring the
performance of
a JVM execution. What I want to do is to obtain, from Java code, the %
of CPU and memory that at a certain instant is consuming the JVM
(better if I can get additional information such as network usage!). Is
there any way I can do this easily?

I have been browsing through the Internet and I cannot find a clear
answer to this topic (using an profiler or the hprof option of the JVM
does not seem to help here).
I am executing my application in Linux, but I would prefer a method
that does not depend on the OS.

Thanks in advance,

Sergio
 
M

Murat Tasan

Hi everybody,

I am trying to determine which is the best way of monitoring the
performance of
a JVM execution. What I want to do is to obtain, from Java code, the %
of CPU and memory that at a certain instant is consuming the JVM
(better if I can get additional information such as network usage!). Is
there any way I can do this easily?

I have been browsing through the Internet and I cannot find a clear
answer to this topic (using an profiler or the hprof option of the JVM
does not seem to help here).
I am executing my application in Linux, but I would prefer a method
that does not depend on the OS.

Thanks in advance,

Sergio


you may be interested in the new JVMTI that was released with java 1.5 or
5.0 or whatever we should call it.

http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#jvmti

if you are more interested in specific system resources, like cpu% and
memory, unfortunately most solutions will be platform-specific. luckily,
any unix-based platform will allow some monitoring through applications
like 'top'.

it is better to stick with the JVMTI for most java apps, though. system
monitoring utilities will monitor the virtual machine itself, and you will
have a difficult time deciphering between resources used by your
application, and those used by the virtual machine's handling of your
application.

hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top