IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  JVM Heap Size

    Posted Wed September 08, 2010 12:16 PM

    Hi

    Is it possible to find out the JVM heap size on Integration server?
    I am using 7.1.2 on UNIX platform.

    It will be better if i get any built-in service other than from WmRoot package. :o

    Any help would be appreciated. Thanks in advance.

    Thanks
    Rohit Ware


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: JVM Heap Size

    Posted Sat September 11, 2010 12:08 AM

    Rohit,

    You could write a small Java service like the following to get certain heap size values. It would take no inputs and have 3 outputs (freeMemory, maxMemory, and totalMemory):

    Runtime r = Runtime.getRuntime();

    IDataCursor pipelineCursor = pipeline.getCursor();
    IDataUtil.put( pipelineCursor, “freeMemory”, ((Long)r.freeMemory()).toString() );
    IDataUtil.put( pipelineCursor, “maxMemory”, ((Long)r.maxMemory()).toString() );
    IDataUtil.put( pipelineCursor, “totalMemory”, ((Long)r.totalMemory()).toString() );
    pipelineCursor.destroy();

    Here’s what the 3 values mean, taken from the Java Doc for JDK 1.5:

    free memory - the amount of free memory in the Java Virtual Machine. Calling the gc method may result in increasing the value returned by freeMemory.

    max memory - the maximum amount of memory that the Java virtual machine will attempt to use.

    total memory - the total amount of memory in the Java virtual machine. The value returned by this method may vary over time, depending on the host environment.

    HTH,
    Dick


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services