Attaching to Windows services for Java profiling

Wednesday, February 15, 2012 | Posted by

Several profilers can attach to running JVMs, but only JProfiler can attach to Windows services. It is very easy to do:

1.Start "Quick attach":



2. All JVMs are shown that run with your user account. Select the "Show services" button at the top:


 3. Select your service:


4. Profile!

7 comments

  1. whether JProfiler can attach with remote linux machine's weblogic services?

    ReplyDelete
  2. Yes, in that case you use the bin/jpenable command line utility on the remote machine to propare the Weblogic process for profiling.

    ReplyDelete
  3. hello Ingo, I was trying to attach jProfiler to a Tomcat service in Windows 2008. In my system Tomcat service is running under a named a/c. I ran jProfiler with same named a/c. What I found that, jProfiler is not able to find the Tomcat process. I tried "Quick Attach". But when I forced Tomcat service to run under "Local System" a/c - jProfiler was able to see the process and was able to attach to it. Now my question is that, why jProfiler is unable to see the Tomcat process when it running under a named a/c? Is this a limitation of jProfiler? Is there any workaround so that I can run Tomcat under a named a/c and still able to profile it by jProfiler?

    ReplyDelete
    Replies
    1. You can run the "JProfiler helper" service as the name user as your tomcat server, then you do not have to run Tomcat under "Local System"

      Delete
    2. Hi Ingo, I tried that. Started up jProfiler from command prompt with "start jprofiler helper" with same named a/c as Tomcat server. Still jProfiler is unable to see the Tomcat process. Any thoughts? Is there any way to see jprofiler logs so that at least I can see where it is failing?

      Delete
    3. Please write to support@ej-technologies.com, that's a better way for us to discuss these things. Changing the account of the helper in the service manager definitely works. "Failing" in this context means that the help does not see the process, there would be nothing logged.

      Delete
    4. I am facing a issue with JProfiler. Issue is it is not able to detect JVM of websphere which is running. I see Websphere is ran as a windows service as a local system account. So, i tried "show Services" option also. But, still it doesnot detect the JVM. Its really taking lot of time for me to resolve this issue. Can you please help.

      Delete