Jump to content
  • BW6.X - How to monitor a BusinessWorks Appnode memory and threads usage using JMX and JvisualVM


    During performance or volume tests, or while working in the analysis of a complex issue, it is sometimes useful to view what is going on within an Appnode JVM to be able to identify bottlenecks and improve the Appnode or the BusinessWorks applications runtime configuration.

    This is also useful to compare the behavior of different Garbage Collectors or to evaluate different Garbage Collector configurations.

    This article is to explain how to monitor a BusinessWorks Appnode using JMX and the open source solution JVisualVM.

    Configure the appnode to enable JMX

    This can be done with the following:

    . Go to the target appnode ‘bin’ directory, this is in the following form:

    <TIBCO_HOME>/bw/6.X/domain/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME>/bin

    . Edit the .tra file of the appnode

    . At the end of the file add the following lines

    java.property.com.sun.management.jmxremote=true

    java.property.com.sun.management.jmxremote.port=9614

    java.property.com.sun.management.jmxremote.local.only=false

    java.property.com.sun.management.jmxremote.authenticate=false

    java.property.com.sun.management.jmxremote.ssl=false

    1*f-0-IdSccne2FlYKsNxdCg.png

    . Restart the appnode

    Note : if you need to monitor multiple appnodes you have to use a unique port number of each appnode

    Install JVIsualVM

    JVisualVM is an open source solution, it can be downloaded at the following URL:

    https://visualvm.github.io/download.html

    To install it you just have to unzip the downloaded package in the directory of your choice.

    JVisualVM needs a Java JDK 8 at minimum to run, if you don’t have a Java JDK 8 available in your environment you have install one (you can use OpenJDK 8 for example).

    If your JDK installation is included in your environment path you can use JVisualVM directly otherwise you have to update the default JVisualVM configuration:
    . Go in the JVisualVM configuration directory <JVISUALVM_HOME>/etc
    . Edit the file jvisualvm.conf
    . Uncomment the following line and add the path to your JDK
    change
    #visualvm_jdkhome=”/path/to/jdk”
    to
    visualvm_jdkhome=c:\tools\OJDK8

    1*q3oImvcZ2FNsHvYEscjpDw.png

    Monitor the appnode with JVisualVM

    Once JVisualVM is launched use the “File -> Open JMX connection” menu option, the following dialog open:

    1*OmMJl1y030Bjhy865-mp2A.png

    Enter your target appnode hostname and JMX port and click OK:

    1*q4t69X5FuqtpbxeR6DUAXg.png

    The target appnode now appears in the application tab:

    1*JZTvxlp2IQONW10MzVVXzA.png

    Right click on it and select ‘Connect’, then right click again and select ‘Open’, the Overview tab is showing up:

    1*5rftT2SVh9I5AcIY1JcYZw.png

    You can select the Monitor tab to monitor the CPU usage, Heap size and usage, and Classes and threads related statistics:

    1*IRQi7QmNZfA7bueI6ep3wg.png

    You can select the Threads tab to view Threads that are used by the Appnode:

    1*N55BkofWsYKSZ8rOAvVGcQ.png

    Finally you can use the ‘Heap Dump’ button to generate a ‘Heap Dump’ for further analysis:

    1*qiUlPVRqzCg_u5H3EfL39A.png

    Additional elements for a memory leak analysis

    In the context of a memory leak analysis you can the use Eclipse Memory Analyser to check a Thread Dump generated by JVisualVM.

    This tool, from the Eclipse Fundation, can be downloaded at the following URL:

    https://projects.eclipse.org/projects/tools.mat/downloads

    Additional elements for BusinessWorks 5.X

    The same approach can be used with a BusinessWorks 5.X engine.

    You just have to update the .tra file of the target application to add the properties mentioned above.

    The .tra file of an application is located in the following directory:
    <DOMAIN_HOME>/application/<APPLICATION_NAME>


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...