WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

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.  How can I get all attributes for the jvmRuntimeModule PMI module using the /metrics end-point

    Posted 05/21/26 01:09 PM

    Hello,

    I'm somehow stuck with a PMI issue as I get only very few fields from the jvmRuntimeModule PMI module.

    Actually I'd need to retrieve the GC statistics using the /metrics endpoint on tWAS 9.0.5.26 and would like to get all fields of the jvmRuntimeModule metrics as per https://www.ibm.com/docs/en/was/9.0.5?topic=app-prometheus-metrics#rprf_prometheus_data__table_bly_ytj_n4b however we are getting only these:

    [dx_user@dx-green-core-0 ~]$ curl http://localhost:10038/metrics 2>/dev/null | grep ^jvm
    jvm_memory_committed_bytes{area="heap"} 8589934592
    jvm_memory_max_bytes{area="heap"} 8589934592
    jvm_memory_used_bytes{area="heap"} 2322653184

    So my first thought was wrong PMI profile (we were on Basic which does not provide JVM data) and therefore set it to All. Restarted the JVM and even get the following message in the log:

    [2026-05-21 15:08:03:975 CEST] 00000001 PMIImpl       A   CWPMI1001I: PMI is enabled
    [2026-05-21 15:08:03:979 CEST] 00000001 PMIImpl       W   CWPMI0110W: Enabling all statistics for PMI can degrade server performance.

    So I'm pretty sure that the All PMI profile is active but I still get only the above data.

    So I tested using the perfServlet:

    curl -u <user> -p -vvv http://localhost:10039/wasPerfTool/servlet/perfservlet?module=jvmRuntimeModule

    and don't get the full jvm info as well:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE PerformanceMonitor SYSTEM "/wasPerfTool/dtd/performancemonitor.dtd">
    <PerformanceMonitor responseStatus="success" version="9.0.5.26">
    <Node name="dockerNode">
    <Server name="WebSphere_Portal">
    <Stat name="JVM Runtime">
    <BoundedRangeStatistic ID="1" highWaterMark="8388608" integral="0.0" lastSampleTime="1779381952075" lowWaterMark="8388608" lowerBound="8388608" mean="0.0" name="HeapSize" startTime="1779368885796" unit="KILOBYTE" upperBound="8388608" value="8388608"/>
    <CountStatistic ID="2" count="6472797" lastSampleTime="1779381952075" name="FreeMemory" startTime="1779368885796" unit="KILOBYTE"/>
    <CountStatistic ID="3" count="1915810" lastSampleTime="1779381952075" name="UsedMemory" startTime="1779368885796" unit="KILOBYTE"/>
    <CountStatistic ID="4" count="13066" lastSampleTime="1779381952075" name="UpTime" startTime="1779368885796" unit="SECOND"/>
    <CountStatistic ID="5" count="0" lastSampleTime="1779381952083" name="ProcessCpuUsage" startTime="1779368885796" unit="N/A"/>
    </Stat>
    </Server>
    </Node>
    </PerformanceMonitor>

    How can I get all of the documented attributes of the jvmRuntimeModule?

    What am I missing here?

    Thanks a lot in advance for any hint and tip



    ------------------------------
    Hermann Huebler
    Cloud Architect
    Alpium IT Solutions GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------


  • 2.  RE: How can I get all attributes for the jvmRuntimeModule PMI module using the /metrics end-point

    Posted 05/26/26 10:02 AM

    Hey Hermann,

    I understand you set PMI to All just for testing, but just to emphasize that, after testing, we wouldn't recommend running with PMI All.

    These are all the JVM PMI counters: https://www.ibm.com/docs/en/was/latest?topic=organization-java-virtual-machine-counters

    I'm not sure why you're only getting the first 5 if you set PMI to All.

    Can you log PMI data to a file through TPV? https://publib.boulder.ibm.com/httpserv/cookbook/Recipes-WAS_traditional_Recipes-Logging_PMI_Data.html

    Then in the resulting XML file, search for one of the JVM data snapshots and paste back here; for example:

    <Stats name="jvmRuntimeModule" statType="jvmRuntimeModule#" il="-2" type="COLLECTION">
    <BRS id="1" lWM="51200" hWM="269504" cur="269504" int="0.0" sT="1627401286723" lST="1627402465256" lB="51200" uB="262144">
    </BRS>
    <CS id="3" sT="1627401286723" lST="1627402465256" ct="211398">
    </CS>
    <CS id="4" sT="1627401286723" lST="1627402465256" ct="1178">
    </CS>
    <CS id="5" sT="1627401286723" lST="1627402465257" ct="1">
    </CS>
    </Stats>



    ------------------------------
    Kevin Grigorenko
    Application Runtimes SWAT
    IBM
    ------------------------------



  • 3.  RE: How can I get all attributes for the jvmRuntimeModule PMI module using the /metrics end-point

    Posted 05/27/26 04:33 AM

    Hello Kevin,

    thanks for your response on this one. Yes, we are aware that the PMI All profile is not recommended for production usage but increased from Basic as we are looking for some GC counters. 

    Here is the resulting output from the PMI data collection:

    <Stats name="jvmRuntimeModule" statType="jvmRuntimeModule#" il="-2" type="COLLECTION">
    <BRS id="1" lWM="8388608" hWM="8388608" cur="8388608" int="0.0" sT="1779797148246" lST="1779805979075" lB="8388608" uB="8388608">
    </BRS>
    <CS id="2" sT="1779797148246" lST="1779805979075" ct="6145387">
    </CS>
    <CS id="3" sT="1779797148246" lST="1779805979075" ct="2243220">
    </CS>
    <CS id="4" sT="1779797148246" lST="1779805979075" ct="8830">
    </CS>
    <CS id="5" sT="1779797148246" lST="1779805979082" ct="0">
    </CS>
    </Stats>
    

    The timestamp of this entry is: May 26, 2026, 2:32:59 PM. A `grep`  over the SystemOut.log files shows that at the server was started using the All PMI statistics set:

    [2026-05-26 14:05:46:393 CEST] 00000001 PMIImpl       A   CWPMI1001I: PMI is enabled
    [2026-05-26 14:05:46:397 CEST] 00000001 PMIImpl       W   CWPMI0110W: Enabling all statistics for PMI can degrade server performance.
    

    So wondering if there is some extra config required to get the GC info from the PMI counters?



    ------------------------------
    Hermann Huebler
    Cloud Architect
    Alpium IT Solutions GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------



  • 4.  RE: How can I get all attributes for the jvmRuntimeModule PMI module using the /metrics end-point

    Posted 05/27/26 09:01 AM

    Hey Hermann,

    Reading the manual more closely, all but the first 5 counters write either:

    • "This counter is not available unless the JVM profiler is enabled.", or
    • "This counter is not available unless the -XrunpmiJvmpiProfiler option is set when starting the JVM."

    Which I'm guessing are the same thing.

    That leads to these documentation pages:

    The last page notes, "JVMTI moderately increases the performance impact".



    ------------------------------
    Kevin Grigorenko
    Application Runtimes SWAT
    IBM
    ------------------------------



  • 5.  RE: How can I get all attributes for the jvmRuntimeModule PMI module using the /metrics end-point

    Posted 05/29/26 01:17 AM

    Hello Kevin,

    thanks a lot for your help and clarifications on this one. Too bad I missed that section in the docs, sorry. But to be honest I focused on the WAS Admin Console's list of counters included in the "all" profile.

    Thanks again and have a good day, Hermann



    ------------------------------
    Hermann Huebler
    Cloud Architect
    Alpium IT Solutions GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------