Download page Instrument JVMs in Restricted Environments.
Instrument JVMs in Restricted Environments
Some restricted environments do not allow any changes to the JVM startup script. For these environments, you can use the environmental variable JAVA_TOOLS_OPTIONS in a wrapper script that allows you to specify the initialization of tools, specifically, -javaagent.
Create the Wrapper Script
Create a wrapper script using this format: {{JAVA_TOOLS_OPTIONS="-javaagent:/opt/appdynamics/appserveragent/javaagent.jar -Dappdynamics.controller.hostName=<controller_host> -Dappdynamics.controller.ssl.enabled=false -Dappdynamics.controller.port=<port> -Dappdynamics.agent.applicationName=<application_name> -Dappdynamics.agent.tierName=<tier_name> -Dappdynamics.agent.nodeName=<node_name>" }} export JAVA_TOOLS_OPTIONS
To specify spaces for the application, tier, or node names, use backslashes and quotes around the value, for example: -Dappdynamics.agent.applicationName=\"$APPLICATION_NAME\"
Add the original startup script to the wrapper script.
Make the new script executable, for example, chmod 750 wrapperscript.sh.