Skip to main content

JEUS

Adding JVM options

This guide explains how to add required JVM options to effectively use the Java monitoring agent in the JEUS application server environment.

  1. Refer to the path of the configuration file for startup options depending on the JEUS version, and then add the -javaagent option.

    $JEUS_HOME/domains/jeus_domain/config.xml
    <domain>
    <servers>
    <server>
    <name>server1</name>
    <jvm-config>
    <jvm-option>
    -Xmx1024m -XX:MaxPermSize=128m
    -javaagent:/whatap/whatap.agent-X.Y.Z.jar
    </jvm-option>
    </jvm-config>
    </server>
    </servers>
    ...
    </domain>
  2. Restart the application server.

    jdown && jboot
  3. Through the application server log file and the agent log file, check whether the agent is operating normally or any error occurs. For the location of log files, see the following:

    • Agent: $WHATAP_HOME/logs/whatap-{SERVER_NAME}-{DATE}.log
    • JEUS 7: $JEUS_HOME/domains/$HOST_NAME/servers/$NODE_NAME/logs/JeusServer.log
    • JEUS 6: $JEUS_HOME/logs/$NODE_NAME/JeusServer.log
  4. Check whether the agent has recognized the application server type and service container name.

Note

Log in Whatap Monitoring Service and then select a project. Select Application > Instance performance analysis, and then select the Runtime boot environment tab. Check the whatap.name and whatap.type entries. The last element of the whatap.name entry must be the container name. The application server's type must be specified in the whatap.type field.

Boot Environment

Note

In case of Java 17 or later, add the following options for reflection.


--add-opens=java.base/java.lang=ALL-UNNAMED

Viewing the heap histogram

WhaTap's Java Monitoring provides the function to view the status of heap occupancy objects in the JVM memory (sizes for each object in heap memory). In APP > Instance performance analysis, select the Heap histogram tab.

Java versions 6 to 8 support basic functions without the JVM options. However, for some Java versions, the JVM options must be applied as follows:

  • Java 9 to Java 15

    -Djdk.attach.allowAttachSelf=true
    example
    java -javaagent:{WHATAP_HOME}/whatap.agent-X.Y.Z.jar -Djdk.attach.allowAttachSelf=true -jar {application.jar}
  • Java 16 or later

    -Djdk.attach.allowAttachSelf=true
    --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED
    example
    java -javaagent:{WHATAP_HOME}/whatap.agent-X.Y.Z.jar -Djdk.attach.allowAttachSelf=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED -jar {application.jar}
Note

It does not support Java 5 or earlier and IBM Java.