how to de-attach agent in a remote JVM?

Questions about YourKit Java Profiler
Post Reply
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

how to de-attach agent in a remote JVM?

Post by ypnsf »

Run /yjp.sh –attach
To attach agent in the remote JVM PID, we will be able to monitor the remote JVM. My question is that
1) How can we de-attach the agent away from the Remote JVM?
2) If the remote JVM is restarted after the attached, we can not monitor the remote JVM any more. Do we need to re-attach the JVM with a new PID?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: how to de-attach agent in a remote JVM?

Post by Anton Katilin »

1) The agent cannot be detached.
2) Yes, you'll need to re-attach to the new PID. Alternatively, please start the profiled application with the agent instead. This will automatically make restarted JVM instances profileable.
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

Re: how to de-attach agent in a remote JVM?

Post by ypnsf »

Thank you,
start the profiled application with the agent instead. This will automatically make restarted JVM instances profileable.
Question: how to JVM is started with profileable and any overhead while the JVM was started with profileable? I just concerned that after Production JVM is started with a profiler, there may have a performance overhead and we can not de-attach it.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: how to de-attach agent in a remote JVM?

Post by Anton Katilin »

Please use the J2EE server integration wizard which suggests startup options to reduce the overhead:
http://www.yourkit.com/docs/java/help/p ... g_j2ee.jsp

Learn more about profiling overhead and how to avoid it:
http://www.yourkit.com/docs/java/help/overhead.jsp
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

Re: how to de-attach agent in a remote JVM?

Post by ypnsf »

Please use the J2EE server integration wizard which suggests startup options to reduce the overhead:
http://www.yourkit.com/docs/java/help/p ... g_j2ee.jsp

Concerns and Questions on this:
As someone mentioned that we can NOT de-attach the agent from JVM to be monitored as long as the agent is integrated with a J2EE JVM container. How can we handle this if there is a huge overhead while youkit agent is running in JVM by integration in Production Environment?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: how to de-attach agent in a remote JVM?

Post by Anton Katilin »

Please read the link I've provided. The overhead is fully controllable, and can be reduced to virtually zero.
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

Re: how to de-attach agent in a remote JVM?

Post by ypnsf »

But, when I tried to do instrumentation against a remote JVM, the entire JVM hanging and application screens frozen for about 20 min.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: how to de-attach agent in a remote JVM?

Post by Anton Katilin »

What instrumentation do you mean? Please clarify.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: how to de-attach agent in a remote JVM?

Post by Anton Katilin »

Learn more about profiling overhead and how to avoid it:
http://www.yourkit.com/docs/java/help/overhead.jsp
Post Reply