Monitor LiveCycle JVM Heap Utilization Using JConsole

The 1.5 (or 5.0) versions of JDKs from Sun (HotSpot), IBM (J9) as well as BEA (JRockit) come with JConsole, a very user-friendly tool that can be used to monitor heap usage within the JVM. It can also be used to monitor a limited number of LiveCycle metrics (such as the number of invocations).

In the next release of LiveCycle (8.2.1, also known as LiveCycle ES Update 1) slated for the latter half of 2008, there will be a lot more LiveCycle JMX metrics you can track. Please see Adobe Technical Guide. Don’t be spooked by the warning you get on opening it (“the author of this document may have chosen to audit your intearactions with it”). It is Adobe LiveCycle Rights Management ES in action.

JBoss
——-
1) First, you have to re-start JBoss with remote JMX monitoring enabled.
2) Figure out a port that is not used on the server.
3) Add the following entries to JBoss’ run.bat or run.sh

rem ————————————–
rem Enable Remote JMX Monitoring
rem ————————————-
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=50050
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=false
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false

for run.sh (Linux)

# ————————————-
# Enable Remote JMX Monitoring
# ————————————
JAVA_OPTS=”$JAVA_OPTS -Dcom.sun.management.jmxremote.port=50050″
JAVA_OPTS=”$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false”
JAVA_OPTS=”$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false”

4) Run JConsole from the /bin folder of the JDK.

IBM WebSphere
——————–
1) Add the following generic JVM argument to the appserver instance that hosts LiveCycle:
-Djavax.management.builder.initial=-Dcom.sun.management.jmxremote
2) Edit the file management.properties in %WAS_HOME%\java\jre\lib\management\ and make sure that the folowing lines are present (port being set to 50050):

# RMI Management Properties
com.sun.management.jmxremote.port=50050
# For RMI monitoring without SSL use the following line
com.sun.management.jmxremote.ssl=false
# ################ RMI User authentication ################
com.sun.management.jmxremote.authenticate=false

4) Run JConsole from the /bin folder of the JDK.

If you are running JConsole on the same server as the appserver that hosts LiveCycle, the JVM will be listed in the ‘Local’ tab of the JConsole ‘Connection’ dialog. If LiveCycle is running on a remote server, click on the ‘Remote’ tab, and provide the IP address and JMX port (50050 in the example above). If com.sun.management.jmxremote.authenticate is set to true, you would need to provide the userID and password.

5) Click on the ‘Memory’ tab. You will see real-time charts you can display for heap memory usage, non-heap memory usage, and memory allocated to the ‘survivor’, ‘eden’, ‘old generation’ and ‘permanent generation’ memory areas. At the bottom, it will also provide you with the frequency and duration of garbage collections. To learn more about generational heap areas, please see article titled “Tuning Garbage Collection with the 5.0 Java Virtual Machine” at the Sun Developer Network.

Since IBM’s J9 JDK does not implement generational garbage collection, its JConsole display for the ‘Memory’ tab will look slightly different.

Running JConsole is not as intrusive as running full-fledged java profilers such as Quest JProbe. Keeping JConsole running during your functional and/or load testing will provide you with valuable insight on the behavior of LiveCycle.

Clicking on the ‘MBeans’ tab will let you track some LiveCycle-specific metrics. For example, expand the adobe.com node on the left. Navigate to adobe.com->XMLFormService->RequestCount->AdobeStat. The value of the ‘Count’ field will tell you how many times the XMLFormService has been invoked since JBoss was started.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)
This entry was posted in Adobe LiveCycle ES. Bookmark the permalink.

4 Responses to Monitor LiveCycle JVM Heap Utilization Using JConsole

  1. Rob McDougall says:

    Hi Jayan,This article is missing a section on BEA WebLogic. I’m trying to get that working now. I’m able to enable JMX montitoring (using the JVM parameters above) however the adobe.com bean is not showing up in the list of MBeans. Any ideas what the problem could be? I’m using LiveCycle 8.2.1 SP3 on BEA Weblogic/Windows.Rob

  2. Jayan Kandathil says:

    Rob:

    For WebLogic running with the Sun HotSpot JDK, you can add the following to the startManagedServer script or to the ‘Arguments’ field in the properties page of the managed server (in WebLogic Admin Console):

    -Dcom.sun.management.jmxremote.port=50050
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false

  3. Whatever I do I cannot get the JConsole to connect to JBoss. From what I gathered so fat there seems to be a bug in JBoss 5.1.0.GA.

    I found that as a workaround I have to add following line to run.conf “javax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl” but this results in Class not found exception. Where can I get this Jar from ?

    Am I right saying that it all should work when I add Java_Opts which you’ve listed above ?

  4. Dimo Theodoridis says:

    Hi,
    for the WebSphere configuration: you’ll need to add a blank space between “=” and “-”
    Cheers,
    Dimo

    Tested with WebSphere 6.1.0.35:
    -Djavax.management.builder.initial= -Dcom.sun.management.jmxremote