AppDynamics Application Intelligence Platform

3.9.x Documentation

PDFs

Learn by Watching

Doc Maps

Skip to end of metadata
Go to start of metadata

The Java Agent bootstraps using the javaagent command line option. Add this option to your Tomcat catalina.sh or catalina.bat file.

If you are using Tomcat as a Windows service, see Tomcat as a Windows Service Configuration.

To add the javaagent command in a Windows environment

  1. Open the catalina.bat file, located at <apache_version_tomcat_install_dir>\bin.
  2. Add the following command to set the environment for Catalina anywhere in the file before the command execution portion of the script. 

    set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:"Drive:<agent_home>\javaagent.jar"

    (warning) If you are a Self-Service Trial user, add the App Agent for Java javaagent argument to your JVM start script where <my-app-jvm1> is the name you use for the application running on that JVM.

    -javaagent:"Drive:<agent_home>\javaagent.jar=uniqueID=<my-app-jvm1>"

    The javaagent argument references the full path to the Java Agent installation directory, including the drive.

    For details, see the following screen captures.

    • Sample Tomcat 5.x catalina.bat file

    •  Sample Tomcat 6.x catalina.bat file
       

    • Sample Tomcat 7.x catalina.bat file
       

  3. Restart the application server. The application server must be restarted for the changes to take effect.

To add the javaagent command in a Linux environment

  1. Open the catalina.sh file located at <apache_version_tomcat_install_dir>/bin.
  2. Add the following command to set the Catalina environment variables anywhere in the file before the command execution portion of the script. 

    export CATALINA_OPTS="$CATALINA_OPTS -javaagent:agent_install_dir/javaagent.jar"

    The javaagent argument references the full path to the Java Agent installation directory.
    (warning) If you are a Self-Service Trial user, add the Java Agent javaagent argument to your JVM start script where <my-app-jvm1> is the name you use for the application running on that JVM.

    -javaagent:<agent_home>/javaagent.jar=uniqueID=<my-app-jvm1>
    

    For details see the screen captures.

    • Sample Tomcat 5.x catalina.sh file

    • Sample Tomcat 6.x catalina.sh file
    • Sample Tomcat 7.x catalina.sh file
  3. Restart the application server. The application server must be restarted for the changes to take effect.

 

 

1 Comment

  1. Unknown User (tdepuy@xmatters.com)

    What is the process for tomcat 7? My tomcat 7 instance on Fedora does not have a catalina.sh.