You can profile an application that is running on a remote system such as a web server by attaching the profiling tool to the application. When you use this mode, the remote application starts after the profiler is attached. This mode enables you to obtain profiling data on the startup of the target JVM.
To attach the profiling tool you use the Attach Wizard to specify the attachment settings for your project. In the Attach Wizard you specify the type of application and the remote location. Based on the details that you provide, the Attach Wizard provides you with a set of instructions on how to configure the remote system to support profiling.
After you configure the remote system according to the instructions, you can attach the profiler to the remote location. You only need to configure the attach mode once. The attachment settings are associated with that project. You can go through the Attach Wizard at any time to change any of the attachment settings.
To profile a remote application:
When you start the remote application, the application will wait until the IDE is attached before starting.
When you click Attach, the IDE will attach to the remote JVM and the application will start. You can view profiling data as you would for a local application.
After the IDE is attached to the remote application you can do the following:
When you detach from the remote application, the remote application does not stop but you stop receiving profiling data about the remote application. To attach to the remote application you need to use the startup options provided by the Attach wizard and start the remote application again.
You can modify the profiling session without detaching from the remote application. For example, you can change the profiling task to monitoring to reduce the profiling overhead, and then modify the task again later. This way you do not need to reattach and restart the remote application.
To attach the profiling tool to a remote system you need to install a Remote Profiler Pack on the remote system. The Remote Profiler Pack is an archive of libraries that enables the profiling tool to attach to the remote system.
To generate a Remote Profiler Pack
If you choose J2EE Web/App Server you also need to select the server type.
When you click Generate Remote Pack you are prompted to specify a location where you want to save the Profiler Remote Pack. After the IDE generates the pack you need to follow the Attach Wizard instructions to install the pack and start the remote system on the pack.