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..." in 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
PID is an optional parameter. Specify it to immediately attach the agent to particular application. If PID parameter is not specified, the wizard will show the list of running JVMs and offer to choose to which JVM to connect.
startup_options is an optional parameter. It allows to choose additional startup options. If PID parameter is not specified, the wizard will offer to specify startup options.