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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Free Memory information (without using getStats)

    Posted 02/01/08 02:01 PM

    Hi,

    I need to collect free memory information on number of services in a development environment. I know that getStats service can be used to get this info.


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Free Memory information (without using getStats)

    Posted 02/04/08 09:51 AM

    Let me clarify a little, there is a system database where all the information is stored (amount of free memory on a server too, it is collected every number of milliseconds automatically by IS).


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Free Memory information (without using getStats)

    Posted 02/04/08 03:39 PM

    Dmitry,

    The total and free memory statistics are collected from the JVM as a follows.

    totalMem: java.lang.Runtime.totalMemory() / 1024
    freeMem:


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Free Memory information (without using getStats)

    Posted 02/05/08 01:58 AM

    Runtime rt = Runtime.getRuntime();

    String total = String.valueOf(rt.totalMemory());
    String free = String.valueOf(rt.freeMemory());
    String max = String.valueOf(rt.maxMemory());

    // open a cursor for the pipeline
    IDataCursor pipelineCursor = pipeline.getCursor();

    IDataUtil.put( pipelineCursor , “TotalMemory”, total);
    IDataUtil.put( pipelineCursor , “MaxMemory”, max);
    IDataUtil.put( pipelineCursor , “FreeMemory”, free);

    pipelineCursor.destroy();


    This is a simple java service to retrive total memory used, free memory available, and more nicely, the Xmx parameter (MaxMemory)


    #Integration-Server-and-ESB
    #webMethods