This page applies to an earlier version of the AppDynamics App IQ Platform.
See the latest version of the documentation.


Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updating code sample, contained real account data

...

  1. Determine the PID of the JVM to which you want to attach. For example, on Linux, use:

    No Format
    ps -A | grep java

    On Windows, use: 

    No Format
    jps -l
  2. Run the following command, replacing the placeholders for the path to the tools.jar file in your JDK, path to the AppDynamics Java Agent home directory, and the JVM process ID with values appropriate for your environment:

    No Format
    java -Xbootclasspath/a:/home/varun/appdynamics/platform/controller/tools/jdk/<path_to_jdk>/lib/tools.jar -javaagent:/home<agent_home>/varun/javaagent/javaagent.jar   -Dappdynamics.controller.hostName=localhost<controller_hostname> -Dappdynamics.controller.port=8090<controller_port_no> -Dappdynamics.controller.ssl.enabled=false -Dappdynamics.agent.applicationName=tomcat<app_name> -Dappdynamics.agent.tierName=tomcatTier<agent_tier_name> -Dappdynamics.agent.nodeName=tomcatNode 12866<agent_node_name> <jvm_process_id> 

    Use the equivalent paths for Windows, including drive letter. The following shows an example with system output included:

    No Format
    [appduser@my_centos6 ~]$ ps -A | grep java
     6780 pts/1    00:00:04 java
    [appduser@my_centos6 ~]$ java -Xbootclasspath/a:/usr/java/jdk1.7.0_79/lib/tools.jar -jar /home/appduser/appagent/javaagent.jar 6780
    Attaching to VM [6780]
    agent path >>>/home/appduser/appagent/javaagent.jar

...