NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Remote attach without waiting for application to start.

 
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users
View previous topic :: View next topic  
Author Message
wmc



Joined: 14 Dec 2011
Posts: 1

PostPosted: Wed Dec 14, 2011 11:08 pm    Post subject: Remote attach without waiting for application to start. Reply with quote

The instructions for remotely connecting to a java app to profile it are:
1. launch my java app on the remote server with the agentpath option set. The app will launch, but wait until the profiler attaches.

But I dont' want it to wait for me. Is this possible? How do I do it?

I could launch it the first time, attach, but then I want to be able to let it run and let me reattach/detach at will.

But I read somewhere else that it won't profile threads that start before I attach, and I don't know if it will be useful to me if I can't see running threads because I attached after they started. Is this true?
Back to top
Tomas Hurka
Posted via mailing list.





PostPosted: Thu Dec 22, 2011 5:56 pm    Post subject: Re: Remote attach without waiting for application to start. Reply with quote

On 15 Dec 2011, at 00:08, wmc wrote:

Quote:
The instructions for remotely connecting to a java app to profile it are:
1. launch my java app on the remote server with the agentpath option set. The app will launch, but wait until the profiler attaches.

But I dont' want it to wait for me. Is this possible? How do I do it?
For remote profiling, it is not possible. This only works for local profiling.

Quote:
I could launch it the first time, attach, but then I want to be able to let it run and let me reattach/detach at will.
For remote profiling, once you detach you cannot reattach. This again only works for local profiling.

There is a workaround for remote profiling, you can attach on startup and use in 'Monitoring' mode. This will just collect some JVM statistics. Once you want to start profiling, you can change profiling mode to CPU or Memory profiling and when you are done, you can again switch back to 'Monitoring' mode.

Bye,
--
Tomas Hurka <mailto:address-removed>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.java.net
Software Developer
Oracle, Praha Czech Republic
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo