| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>Stats (OpenJ9 JVM Diagnostic Utilities Classes)</title> |
| <meta name="keywords" content="com.ibm.jvm.Stats class"> |
| <meta name="keywords" content="setFields()"> |
| <meta name="keywords" content="getCommittedHeap()"> |
| <meta name="keywords" content="getUsedHeap()"> |
| <meta name="keywords" content="getMaxHeap()"> |
| <meta name="keywords" content="getSoftmxHeap()"> |
| <meta name="keywords" content="getFreePhysicalMem()"> |
| <meta name="keywords" content="getTotPhysicalMem()"> |
| <meta name="keywords" content="getSysLoadAvg()"> |
| <meta name="keywords" content="getCpuTime()"> |
| <meta name="keywords" content="getStats()"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Stats (OpenJ9 JVM Diagnostic Utilities Classes)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../com/ibm/jvm/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Stats.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><strong>OpenJ9 JVM Diagnostic Utilities Classes</strong></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../com/ibm/jvm/LogPermission.html" title="class in com.ibm.jvm"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/ibm/jvm/ToolDumpPermission.html" title="class in com.ibm.jvm"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/ibm/jvm/Stats.html" target="_top">Frames</a></li> |
| <li><a href="Stats.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">com.ibm.jvm</div> |
| <h2 title="Class Stats" class="title">Class Stats</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>com.ibm.jvm.Stats</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">Stats</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">This class is used provide the following java heap and system statistics: |
| <ul> |
| <li>committed heap memory</li> |
| <li>used heap memory</li> |
| <li>max heap memory</li> |
| <li>softmx heap memory</li> |
| <li>free physical memory</li> |
| <li>total physical memory</li> |
| </ul> |
| All this info is retrieved without any allocation of new objects.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#Stats--">Stats</a></span>()</code> |
| <div class="block">Construct a new instance.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getCommittedHeap--">getCommittedHeap</a></span>()</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getCpuTime--">getCpuTime</a></span>()</code> |
| <div class="block">Returns total amount of time the process has been scheduled or executed so far |
| in both kernel and user modes.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getFreePhysicalMem--">getFreePhysicalMem</a></span>()</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getMaxHeap--">getMaxHeap</a></span>()</code> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getSoftmxHeap--">getSoftmxHeap</a></span>()</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getStats--">getStats</a></span>()</code> |
| <div class="block">Native method used to retrieve the heap/OS stats.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getSysLoadAvg--">getSysLoadAvg</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getTotPhysicalMem--">getTotPhysicalMem</a></span>()</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#getUsedHeap--">getUsedHeap</a></span>()</code> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/jvm/Stats.html#setFields-long-long-long-long-long-double-long-long-">setFields</a></span>(long committed, |
| long used, |
| long max, |
| long free, |
| long tot, |
| double sysLoadAvg, |
| long cpuTime, |
| long softmxHeap)</code> |
| <div class="block">To avoid allocating new objects, this function merely sets |
| the member variables of this class as it is called from a |
| native.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="Stats--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Stats</h4> |
| <pre>public Stats()</pre> |
| <div class="block">Construct a new instance.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setFields-long-long-long-long-long-double-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setFields</h4> |
| <pre>public void setFields(long committed, |
| long used, |
| long max, |
| long free, |
| long tot, |
| double sysLoadAvg, |
| long cpuTime, |
| long softmxHeap)</pre> |
| <div class="block">To avoid allocating new objects, this function merely sets |
| the member variables of this class as it is called from a |
| native.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>committed</code> - is the committed heap size (bytes)</dd> |
| <dd><code>used</code> - is the amount of used memory on the java heap (bytes)</dd> |
| <dd><code>max</code> - is the maximum bound of the java heap (bytes)</dd> |
| <dd><code>free</code> - is the amount of free physical memory (bytes)</dd> |
| <dd><code>tot</code> - is the amount of total physical memory (bytes)</dd> |
| <dd><code>sysLoadAvg</code> - is the system load average in decimal (capacity of cpu)</dd> |
| <dd><code>cpuTime</code> - is the time elapsed since the start of the jvm process</dd> |
| <dd><code>softmxHeap</code> - is the softmx heap value (-Xsoftmx or changed from MemoryMXBean) value in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCommittedHeap--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCommittedHeap</h4> |
| <pre>public long getCommittedHeap()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the committed heap (reserved memory) in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getUsedHeap--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUsedHeap</h4> |
| <pre>public long getUsedHeap()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>how much of the java heap is used by the application in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxHeap--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxHeap</h4> |
| <pre>public long getMaxHeap()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the maximum java heap memory that can be used by the jvm application (-Xmx) in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSoftmxHeap--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSoftmxHeap</h4> |
| <pre>public long getSoftmxHeap()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the softmx java heap memory (set by -Xsoftmx or from the MemoryMXBean.setMaxHeapSize)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFreePhysicalMem--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFreePhysicalMem</h4> |
| <pre>public long getFreePhysicalMem()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the amount of free physical memory in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTotPhysicalMem--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTotPhysicalMem</h4> |
| <pre>public long getTotPhysicalMem()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the total amount of physical memory in bytes</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSysLoadAvg--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSysLoadAvg</h4> |
| <pre>public double getSysLoadAvg()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the system load average in last minute (fraction)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCpuTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCpuTime</h4> |
| <pre>public long getCpuTime()</pre> |
| <div class="block">Returns total amount of time the process has been scheduled or executed so far |
| in both kernel and user modes.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>time in 100 ns units, or -1 in the case of an error or if this metric |
| is not supported for this operating system.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getStats--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getStats</h4> |
| <pre>public void getStats()</pre> |
| <div class="block">Native method used to retrieve the heap/OS stats.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../com/ibm/jvm/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Stats.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><strong>OpenJ9 JVM Diagnostic Utilities Classes</strong></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../com/ibm/jvm/LogPermission.html" title="class in com.ibm.jvm"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/ibm/jvm/ToolDumpPermission.html" title="class in com.ibm.jvm"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/ibm/jvm/Stats.html" target="_top">Frames</a></li> |
| <li><a href="Stats.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><a href="https://www.eclipse.org/openj9/" target="_blank">Eclipse OpenJ9 website.</a><br> To raise a bug report or suggest an improvement create an <a href="https://github.com/eclipse-openj9/openj9/issues" target="_blank">Eclipse OpenJ9 issue.</a><br> Copyright © 1998, 2021, IBM Corp. and others.</small></p> |
| </body> |
| </html> |