Page tree
Skip to end of metadata
Go to start of metadata

As part of the App Visibility agent for Java installation process, you must add the agent JVM options to the Java command line of your application server.

The procedure to update the JVM options is different for each application server type, and this topic provides examples for some of the leading types of application servers. If you have more than one JVM process using the same agent installation, you can assign meaningful names to distinguish each instance.

This topic includes the following sections:

Before you begin

  • Install an App Visibility agent for Java
  • The App Visibility agent for Java runs in the same JVM memory space as the monitored applications, therefore BMC recommends increasing by 256 MB the maximum heap size specified through the -Xmx Java option.

    Example

    set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m

    For full details about both the -javaagent and -Xmx options, refer to the Java options documentation for your application server type.

  • In the following procedures, replace the <AgentInstallationDirectory> with the location where the agent is installed. The default folder is the one from which the installation script is run, for example:
    • Windows
      <AgentInstallationDirectory>\ADOPsInstall\adops-agent.jar
      Where <AgentInstallationDirectory> is the C:\bmc\appvis_agent directory

    • Linux
      <AgentInstallationDirectory>/ADOPsInstall/adops-agent.jar
      Where <AgentInstallationDirectory> is the /usr/bmc/appvis_agent directory

To distinguish multiple JVM processes using the same agent installation

If you have a single App Visibility agent installation directory that is used by multiple JVM processes, you can assign meaningful names to distinguish each instance. Otherwise, the same application server name (defined during installation) might be displayed multiple times.

Use one of the following command-line arguments for each JVM process:

  • -Dcom.bmc.adops.agent.instance.global.name=<globallyUniqueName>
    The <globallyUniqueName> value must be unique among all App Visibility agents in the system.
  • -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>
    The <locallyUniqueName> value must be unique for each application server instance on the computer that uses the agent. The <locallyUniqueName> value is appended to the application server display name defined during agent installation (or the agent host name, if you did not define a name during installation).

Note

The values for <globallyUniqueName> and <locallyUniqueName> can include only alphanumeric Latin characters, spaces, underscore characters (_), and hyphens (-).

Configure WebSphere JVM options from the admin console; do not configure them from the start script.

  1. Log in to the WebSphere admin console.
  2. Expand Server Type and select WebSphere application servers.
  3. Click the name of the server to which you want to attach the App Visibility agent.
  4. Expand Java and Process Management and select Process Definition.
  5. Under the Additional Properties section, click Java Virtual Machine.
  6. Scroll down and locate the text box for Generic JVM arguments.
  7. Add the following arguments, separating each argument by a single space:

    • Windows

      -javaagent:<AgentInstallationDirectory>\ADOPsInstall\adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>
    • Linux

      -javaagent:<AgentInstallationDirectory>/ADOPsInstall/adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>

    Note

    Do not enter a new line between the arguments. A new line between the arguments can prevent the argument from being applied.

  8. Save the configuration.
  9. Restart the WebSphere Application Server process.
    For further information about setting JVM arguments in WebSphere, see the IBM website .

 

To update options for Oracle WebLogic

Watch videos on YouTube

Watch Installing App Visibility Part 4 | Installing the Agent for Java (starting at 1:05) to add the agent through the Oracle starter file, startWebLogic.cmd, in the bin directory.
  1. Edit the startWebLogic.cmd (Windows) or startWebLogic.sh (Linux) script. 
    This script is used when starting both admin and managed servers. The startManagedWebLogic script calls the startWebLogic script.
  2. Locate the JAVA_OPTIONS environment variable and add the following lines:

    • Windows

      set JAVA_OPTIONS=%JAVA_OPTIONS% -javaagent:<AgentInstallationDirectory>\ADOPsInstall\adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>
    • Linux

      JAVA_OPTIONS="${JAVA_OPTIONS} -javaagent:<AgentInstallationDirectory>/ADOPsInstall/adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<LocalUniqueID>"
  3. Restart the WebLogic Application Server process.
    For further information about specifying Java options for a WebLogic server instance, see the  Oracle website .

To update options for Apache Tomcat

  1. Edit Tomcat’s catalina.bat (Windows) or catalina.sh (Linux) script.
  2. Locate the CATALINA_OPTS environment variable.
  3. Add the following lines:

    • Windows

      set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:<AgentInstallationDirectory>\ADOPsInstall\adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>
    • Linux

      CATALINA_OPTS="$CATALINA_OPTS -javaagent:<AgentInstallationDirectory>/ADOPsInstall/adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>"
  4. Restart the Apache Tomcat Application Server process.
    For further information about changing Java options when Tomcat runs as a Windows Service, see the  Apache website .

To update options for JBoss

  1. Edit the JBoss run.cmd (Windows) or run.sh (Linux) script.
  2. Locate the JAVA_OPTS environment variable.
  3. Add the following lines:

    • Windows

      set JAVA_OPTS=%JAVA_OPTS% -javaagent:<AgentInstallationDirectory>\ADOPsInstall\adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>
    • Linux

      JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -javaagent:<AgentInstallationDirectory>/ADOPsInstall/adops-agent.jar -Dcom.bmc.adops.agent.instance.local.name=<locallyUniqueName>"
  4. Restart the JBoss Application Server process.
    For further information about updating the JBoss configuration or run script, see the  JBoss website .

Where to go from here

Verifying the installation of App Visibility agent for Java

Related topics

Installing an App Visibility agent for Java

Granting Java 2 permissions to the App Visibility agent