> From: Caldarale, Charles R
> Subject: RE: Profiling tomcat applications with -Xrunhprof (Tomcat runs
> asa Windows Service)
> 
> What might work is using JVisualVM instead and just looking at the
> information in the GUI.

I did get JVisualVM to work with Tomcat running as a service, but I don't think 
you're going to like it (to paraphrase Douglas Adams).

First, the Tomcat service needs to be running under the same Windows account 
that JVisualVM is started with; JVisualVM cannot find the PID otherwise, and 
heap profiling doesn't seem to be available through JMX ports (or maybe I just 
don't know how to configure it).

Second, you'll need to run Tomcat under JRE/JDK 1.6.  JVisualVM can access 
Tomcat running under a 1.5 JRE, but heap profiling won't be available.

So, the easiest thing may well be to just run Tomcat from the command prompt 
for the duration of the profiling effort.  Since heap profiling has a 
significant performance impact, you wouldn't want it on very long anyhow.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

Reply via email to