The following describes attaching profiler to a running JVM
on a remote machine
(i.e. the profiled JVM and the profiler UI run on different machines).
If application runs locally, you can attach to it directly from the profiler's Welcome screen.
Note that attaching profiler agent to a running JVM has limitations, which can be avoided starting application with the profiler agent.
If you have only a console access (e.g. via telnet, ssh etc.) to the machine where the application to be profiled is hosted, use the console version of the attach wizard. The wizard will load the profiler agent to specified running JVM. After it succeeds, you will be able to connect to that application via "Connect to remote application..." on the Welcome screen.
Run this command and follow instructions that appear:
<Profiler Installation Directory>\bin\attach.bat
<Profiler Installation Directory>\bin\attach.bat <PID>
<Profiler Installation Directory>\bin\attach.bat <PID> <startup_options>
On other platforms:
<directory with unpacked content>/bin/yjp.sh -attach
<directory with unpacked content>/bin/yjp.sh -attach <PID>
<directory with unpacked content>/bin/yjp.sh -attach <PID> <startup_options>
is an optional parameter.
Specify it to immediately attach the agent to particular application.
<PID> is not specified,
the wizard will show the list of running JVMs
and offer to choose to which JVM to connect.
is an optional parameter to specify additional startup options.
<PID> parameter is not specified,
the wizard will offer to specify startup options.