Attach the Java Agent to a Running JVM Process
Attaching the agent to a running JVM allows you to install the Java Agent without
requiring a JVM restart. This approach would normally be used alongside adding the
‑javaagent
argument to the JVM startup script, or some other persistent
approach to ensure that the agent is loaded again at the next JVM restart. However, the
dynamic attachment allows you to install the agent when restarting the JVM is not
possible or convenient.
-javaagent:C:\\appdynamics\\javaagent.jar
Dynamic agent attachment works if:
- JVM is => 1.6.
- JVM is an Oracle (HotSpot) JVMs (unavailable for IBM or JRockit JVMs).
Other considerations include:
- Do not attach the agent dynamically to an environment that is already instrumented (either by the Splunk AppDynamics Java Agent or another type of agent). Doing so can cause unforeseeable issues and errors.
- Attaching the Splunk AppDynamics Java Agent to a running environment will impact the performance of the application while the agent performs the class retransformation needed to instrument the application. The agent overhead will return to its normal operating level when it finishes the process, but it is important to consider the potential performance impact to production services.