Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Console attach wizard

This article describes how to use console wizard to attach profiler agent to a running JVM. Console wizard might be useful if you want to profile remote Java EE server or the machine has no graphics environment.

Note that attaching profiler agent to a running JVM has limitations, which can be avoided starting application with the profiler agent.

See also Attaching profiler agent to a running JVM.

Running the wizard

Install profiler on the machine where your Java application is running. License key is not required to use the wizard.

Run the command below:

On Windows

<Profiler Installation Directory>\bin\attach.bat
or
<Profiler Installation Directory>\bin\attach.bat <PID>
or
<Profiler Installation Directory>\bin\attach.bat <PID> <startup_options>


On macOS

<Profiler Installation Directory>/Contents/Resources/bin/attach.sh
or
<Profiler Installation Directory>/Contents/Resources/bin/attach.sh <PID>
or
<Profiler Installation Directory>/Contents/Resources/bin/attach.sh <PID> <startup_options>


On other platforms

<directory with unpacked content>/bin/attach.sh
or
<directory with unpacked content>/bin/attach.sh <PID>
or
<directory with unpacked content>/bin/attach.sh <PID> <startup_options>


<PID>is an optional parameter. Specify it to immediately attach the agent to particular application. If <PID> 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 to specify additional startup options. If <PID> parameter is not specified, the wizard will offer to specify startup options.

Follow the instructions that will appear:

After the profiler agent is attached, its port will be printed out. Use this port number to connect to the application and start profiling.