| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (18) --> |
| <title>OperatingSystemMXBean (OpenJ9 JDK 18)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: module: jdk.management, package: com.ibm.lang.management, interface: OperatingSystemMXBean"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="com.ibm.lang.management.OperatingSystemMXBean interface"> |
| <meta name="keywords" content="getTotalPhysicalMemory()"> |
| <meta name="keywords" content="getProcessingCapacity()"> |
| <meta name="keywords" content="getProcessCpuTime()"> |
| <meta name="keywords" content="getProcessCpuTimeByNS()"> |
| <meta name="keywords" content="getCommittedVirtualMemorySize()"> |
| <meta name="keywords" content="getProcessVirtualMemorySize()"> |
| <meta name="keywords" content="getProcessPrivateMemorySize()"> |
| <meta name="keywords" content="getProcessPhysicalMemorySize()"> |
| <meta name="keywords" content="getTotalSwapSpaceSize()"> |
| <meta name="keywords" content="getFreeSwapSpaceSize()"> |
| <meta name="keywords" content="getProcessCpuLoad()"> |
| <meta name="keywords" content="retrieveTotalProcessorUsage()"> |
| <meta name="keywords" content="retrieveProcessorUsage()"> |
| <meta name="keywords" content="retrieveMemoryUsage()"> |
| <meta name="keywords" content="getHardwareModel()"> |
| <meta name="keywords" content="isHardwareEmulated()"> |
| <meta name="keywords" content="isProcessRunning()"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"></span><span class="nav-bar-toggle-icon"></span><span class="nav-bar-toggle-icon"></span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <div class="about-language"><div style="margin-top: 9px;"><strong>OpenJ9 JDK 18</strong></div></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/OperatingSystemMXBean.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-files/index-1.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-type">Module</span> <a href="../../../../module-summary.html">jdk.management</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">com.ibm.lang.management</a></div> |
| <h1 title="Interface OperatingSystemMXBean" class="title">Interface OperatingSystemMXBean</h1> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Superinterfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html" title="class or interface in java.lang.management" class="external-link" target="_blank">OperatingSystemMXBean</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/PlatformManagedObject.html" title="class or interface in java.lang.management" class="external-link" target="_blank">PlatformManagedObject</a></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>All Known Subinterfaces:</dt> |
| <dd><code><a href="UnixOperatingSystemMXBean.html" title="interface in com.ibm.lang.management">UnixOperatingSystemMXBean</a></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><code><a href="internal/ExtendedOperatingSystemMXBeanImpl.html" title="class in com.ibm.lang.management.internal">ExtendedOperatingSystemMXBeanImpl</a></code>, <code><a href="internal/UnixExtendedOperatingSystem.html" title="class in com.ibm.lang.management.internal">UnixExtendedOperatingSystem</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">OperatingSystemMXBean</span><span class="extends-implements"> |
| extends <a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></span></div> |
| <div class="block">OpenJ9 platform management extension interface for the Operating System on which the Java Virtual Machine is running. |
| <br> |
| <table border="1"> |
| <caption><b>Usage example for the <a href="OperatingSystemMXBean.html" title="interface in com.ibm.lang.management"><code>OperatingSystemMXBean</code></a></b></caption> |
| <tr> <td> <pre> |
| <code> |
| ... |
| com.ibm.lang.management.OperatingSystemMXBean osmxbean = null; |
| osmxbean = (com.ibm.lang.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean(); |
| ... |
| </code> |
| </pre></td></tr></table> |
| <br> |
| |
| The following methods depend on certain information that is not available on z/OS; |
| their return values are listed here: |
| <table border="1"> |
| <caption><b>Methods not fully supported on z/OS</b></caption> |
| <tr> |
| <th style="text-align:left">Method</th> |
| <th style="text-align:left">Return Value</th> |
| </tr> |
| <tr> |
| <td><a href="#getCommittedVirtualMemorySize()"><code>getCommittedVirtualMemorySize()</code></a></td> |
| <td><code>-1</code></td> |
| </tr> |
| <tr> |
| <td><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()" title="class or interface in com.sun.management" class="external-link" target="_blank"><code>OperatingSystemMXBean.getCpuLoad()</code></a></td> |
| <td><code>-3.0</code> (<a href="CpuLoadCalculationConstants.html#UNSUPPORTED_VALUE"><code>CpuLoadCalculationConstants.UNSUPPORTED_VALUE</code></a>)</td> |
| </tr> |
| <tr> |
| <td><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getFreeMemorySize()" title="class or interface in com.sun.management" class="external-link" target="_blank"><code>OperatingSystemMXBean.getFreeMemorySize()</code></a></td> |
| <td><code>-1</code></td> |
| </tr> |
| <tr> |
| <td><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getFreePhysicalMemorySize()" title="class or interface in com.sun.management" class="external-link" target="_blank"><code>OperatingSystemMXBean.getFreePhysicalMemorySize()</code></a></td> |
| <td><code>-1</code></td> |
| </tr> |
| <tr> |
| <td><a href="#getProcessPhysicalMemorySize()"><code>getProcessPhysicalMemorySize()</code></a></td> |
| <td><code>-1</code></td> |
| </tr> |
| <tr> |
| <td><a href="#getProcessPrivateMemorySize()"><code>getProcessPrivateMemorySize()</code></a></td> |
| <td><code>-1</code></td> |
| </tr> |
| <tr> |
| <td><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getSystemCpuLoad()" title="class or interface in com.sun.management" class="external-link" target="_blank"><code>OperatingSystemMXBean.getSystemCpuLoad()</code></a></td> |
| <td><code>-3.0</code> (<a href="CpuLoadCalculationConstants.html#UNSUPPORTED_VALUE"><code>CpuLoadCalculationConstants.UNSUPPORTED_VALUE</code></a>)</td> |
| </tr> |
| </table></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.5</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="CpuLoadCalculationConstants.html" title="interface in com.ibm.lang.management"><code>CpuLoadCalculationConstants</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getCommittedVirtualMemorySize()" class="member-name-link">getCommittedVirtualMemorySize</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the amount of virtual memory used by the process in bytes.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getFreeSwapSpaceSize()" class="member-name-link">getFreeSwapSpaceSize</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the amount of free swap space in bytes.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getHardwareModel()" class="member-name-link">getHardwareModel</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Instantiates and returns an instance of a <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank"><code>String</code></a> object containing |
| hardware model information</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>double</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getProcessCpuLoad()" class="member-name-link">getProcessCpuLoad</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the recent CPU usage for the Java Virtual Machine process.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getProcessCpuTime()" class="member-name-link">getProcessCpuTime</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns total amount of time the process has been scheduled or |
| executed so far in both kernel and user modes.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code><a href="#getProcessCpuTimeByNS()" class="member-name-link">getProcessCpuTimeByNS</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"> |
| <div class="block"><span class="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span></div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getProcessingCapacity()" class="member-name-link">getProcessingCapacity</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the collective capacity of the virtual processors in |
| the partition the VM is running in.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getProcessPhysicalMemorySize()" class="member-name-link">getProcessPhysicalMemorySize</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the amount of physical memory being used by the process |
| in bytes.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getProcessPrivateMemorySize()" class="member-name-link">getProcessPrivateMemorySize</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the amount of private memory used by the process in bytes.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code><a href="#getProcessVirtualMemorySize()" class="member-name-link">getProcessVirtualMemorySize</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"> |
| <div class="block"><span class="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span></div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code><a href="#getTotalPhysicalMemory()" class="member-name-link">getTotalPhysicalMemory</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"> |
| <div class="block"><span class="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span></div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getTotalSwapSpaceSize()" class="member-name-link">getTotalSwapSpaceSize</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the total amount of swap space in bytes.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isHardwareEmulated()" class="member-name-link">isHardwareEmulated</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Identify whether the underlying hardware is being emulated</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isProcessRunning(long)" class="member-name-link">isProcessRunning</a><wbr>(long pid)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Indicates if the specified process is running</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="MemoryUsage.html" title="class in com.ibm.lang.management">MemoryUsage</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#retrieveMemoryUsage()" class="member-name-link">retrieveMemoryUsage</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Instantiates and returns an instance of <a href="MemoryUsage.html" title="class in com.ibm.lang.management"><code>MemoryUsage</code></a> object |
| that represents the current snapshot of Memory usage statistics.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="MemoryUsage.html" title="class in com.ibm.lang.management">MemoryUsage</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#retrieveMemoryUsage(com.ibm.lang.management.MemoryUsage)" class="member-name-link">retrieveMemoryUsage</a><wbr>(<a href="MemoryUsage.html" title="class in com.ibm.lang.management">MemoryUsage</a> memObj)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns an updated <a href="MemoryUsage.html" title="class in com.ibm.lang.management"><code>MemoryUsage</code></a> object that represents the |
| current snapshot of Memory usage statistics.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a>[]</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#retrieveProcessorUsage()" class="member-name-link">retrieveProcessorUsage</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Instantiates and returns an array of <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> objects |
| that represent the current snapshot of individual Processor usage times.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a>[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#retrieveProcessorUsage(com.ibm.lang.management.ProcessorUsage%5B%5D)" class="member-name-link">retrieveProcessorUsage</a><wbr>(<a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a>[] procArray)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns an updated array of <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> objects |
| that represent the current snapshot of individual Processor usage times.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#retrieveTotalProcessorUsage()" class="member-name-link">retrieveTotalProcessorUsage</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Instantiate and return a new <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> object that |
| represents the current snapshot of Processor usage statistics.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#retrieveTotalProcessorUsage(com.ibm.lang.management.ProcessorUsage)" class="member-name-link">retrieveTotalProcessorUsage</a><wbr>(<a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a> procObj)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns an updated <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> object that represents the |
| current snapshot of Processor usage statistics.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-com.sun.management.OperatingSystemMXBean">Methods declared in interface com.sun.management.<a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()" title="class or interface in com.sun.management" class="external-link" target="_blank">getCpuLoad</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getFreeMemorySize()" title="class or interface in com.sun.management" class="external-link" target="_blank">getFreeMemorySize</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getFreePhysicalMemorySize()" title="class or interface in com.sun.management" class="external-link" target="_blank">getFreePhysicalMemorySize</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getSystemCpuLoad()" title="class or interface in com.sun.management" class="external-link" target="_blank">getSystemCpuLoad</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getTotalMemorySize()" title="class or interface in com.sun.management" class="external-link" target="_blank">getTotalMemorySize</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getTotalPhysicalMemorySize()" title="class or interface in com.sun.management" class="external-link" target="_blank">getTotalPhysicalMemorySize</a></code></div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.management.OperatingSystemMXBean">Methods declared in interface java.lang.management.<a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html" title="class or interface in java.lang.management" class="external-link" target="_blank">OperatingSystemMXBean</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getArch()" title="class or interface in java.lang.management" class="external-link" target="_blank">getArch</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getAvailableProcessors()" title="class or interface in java.lang.management" class="external-link" target="_blank">getAvailableProcessors</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getName()" title="class or interface in java.lang.management" class="external-link" target="_blank">getName</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()" title="class or interface in java.lang.management" class="external-link" target="_blank">getSystemLoadAverage</a>, <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getVersion()" title="class or interface in java.lang.management" class="external-link" target="_blank">getVersion</a></code></div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.management.PlatformManagedObject">Methods declared in interface java.lang.management.<a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/PlatformManagedObject.html" title="class or interface in java.lang.management" class="external-link" target="_blank">PlatformManagedObject</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.management/java/lang/management/PlatformManagedObject.html#getObjectName()" title="class or interface in java.lang.management" class="external-link" target="_blank">getObjectName</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="getTotalPhysicalMemory()"> |
| <h3>getTotalPhysicalMemory</h3> |
| <div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link" target="_blank">@Deprecated</a>(<a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html#forRemoval()" title="class or interface in java.lang" class="external-link" target="_blank">forRemoval</a>=true, |
| <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html#since()" title="class or interface in java.lang" class="external-link" target="_blank">since</a>="1.8") |
| </span><span class="return-type">long</span> <span class="element-name">getTotalPhysicalMemory</span>()</div> |
| <div class="deprecation-block"><span class="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span></div> |
| <div class="block">Deprecated: use getTotalMemorySize()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the total available physical memory on the system in bytes.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProcessingCapacity()"> |
| <h3>getProcessingCapacity</h3> |
| <div class="member-signature"><span class="return-type">int</span> <span class="element-name">getProcessingCapacity</span>()</div> |
| <div class="block">Returns the collective capacity of the virtual processors in |
| the partition the VM is running in. The value returned is in |
| units of 1% of a physical processor's capacity, so a value of |
| 100 is equal to 1 physical processor. In environments without |
| such partitioning support, this call will return |
| getAvailableProcessors() * 100.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the collective capacity of the virtual processors available |
| to the VM.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProcessCpuTime()"> |
| <h3>getProcessCpuTime</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getProcessCpuTime</span>()</div> |
| <div class="block">Returns total amount of time the process has been scheduled or |
| executed so far in both kernel and user modes. Returns -1 if the |
| value is unavailable on this platform or in the case of an error. |
| |
| Note that as of Java 8 SR5 the returned value is in 1 ns units, unless the system property |
| com.ibm.lang.management.OperatingSystemMXBean.isCpuTime100ns is set to "true".</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuTime()" title="class or interface in com.sun.management" class="external-link" target="_blank">getProcessCpuTime</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>process CPU time.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProcessCpuTimeByNS()"> |
| <h3>getProcessCpuTimeByNS</h3> |
| <div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link" target="_blank">@Deprecated</a>(<a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html#forRemoval()" title="class or interface in java.lang" class="external-link" target="_blank">forRemoval</a>=true, |
| <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html#since()" title="class or interface in java.lang" class="external-link" target="_blank">since</a>="1.8") |
| </span><span class="return-type">long</span> <span class="element-name">getProcessCpuTimeByNS</span>()</div> |
| <div class="deprecation-block"><span class="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span></div> |
| <div class="block">Deprecated. Use getProcessCpuTime()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCommittedVirtualMemorySize()"> |
| <h3>getCommittedVirtualMemorySize</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getCommittedVirtualMemorySize</span>()</div> |
| <div class="block">Returns the amount of virtual memory used by the process in bytes. |
| Returns -1 if the value is unavailable on this platform or in the |
| case of an error. |
| <ul> |
| <li>This information is not available on the z/OS platform. |
| </ul></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCommittedVirtualMemorySize()" title="class or interface in com.sun.management" class="external-link" target="_blank">getCommittedVirtualMemorySize</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>amount of virtual memory used by the process in bytes.</dd> |
| <dt>Since:</dt> |
| <dd>1.8</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProcessVirtualMemorySize()"> |
| <h3>getProcessVirtualMemorySize</h3> |
| <div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link" target="_blank">@Deprecated</a>(<a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html#forRemoval()" title="class or interface in java.lang" class="external-link" target="_blank">forRemoval</a>=true, |
| <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Deprecated.html#since()" title="class or interface in java.lang" class="external-link" target="_blank">since</a>="1.8") |
| </span><span class="return-type">long</span> <span class="element-name">getProcessVirtualMemorySize</span>()</div> |
| <div class="deprecation-block"><span class="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span></div> |
| <div class="block">Deprecated. Use getCommittedVirtualMemorySize()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProcessPrivateMemorySize()"> |
| <h3>getProcessPrivateMemorySize</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getProcessPrivateMemorySize</span>()</div> |
| <div class="block">Returns the amount of private memory used by the process in bytes. |
| Returns -1 if the value is unavailable on this platform or in the |
| case of an error. |
| <ul> |
| <li>This information is not available on the z/OS platform. |
| </ul></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>amount of private memory used by the process in bytes.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProcessPhysicalMemorySize()"> |
| <h3>getProcessPhysicalMemorySize</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getProcessPhysicalMemorySize</span>()</div> |
| <div class="block">Returns the amount of physical memory being used by the process |
| in bytes. Returns -1 if the value is unavailable on this platform |
| or in the case of an error. |
| <ul> |
| <li>This information is not available on the AIX and z/OS platforms. |
| </ul></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>amount of physical memory being used by the process in bytes.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getTotalSwapSpaceSize()"> |
| <h3>getTotalSwapSpaceSize</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getTotalSwapSpaceSize</span>()</div> |
| <div class="block">Returns the total amount of swap space in bytes.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getTotalSwapSpaceSize()" title="class or interface in com.sun.management" class="external-link" target="_blank">getTotalSwapSpaceSize</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the total amount of swap space in bytes.</dd> |
| <dt>Since:</dt> |
| <dd>1.7</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getFreeSwapSpaceSize()"> |
| <h3>getFreeSwapSpaceSize</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getFreeSwapSpaceSize</span>()</div> |
| <div class="block">Returns the amount of free swap space in bytes.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getFreeSwapSpaceSize()" title="class or interface in com.sun.management" class="external-link" target="_blank">getFreeSwapSpaceSize</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>the amount of free swap space in bytes.</dd> |
| <dt>Since:</dt> |
| <dd>1.7</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getProcessCpuLoad()"> |
| <h3>getProcessCpuLoad</h3> |
| <div class="member-signature"><span class="return-type">double</span> <span class="element-name">getProcessCpuLoad</span>()</div> |
| <div class="block">Returns the recent CPU usage for the Java Virtual Machine process. |
| This value is a double in the [0.0,1.0] interval. A value of 0.0 means |
| that none of the CPUs were running threads from the JVM process during |
| the recent period of time observed, while a value of 1.0 means that all |
| CPUs were actively running threads from the JVM 100% of the time |
| during the recent period of time observed. Threads from the JVM include |
| application threads as well as JVM internal threads. All values |
| between 0.0 and 1.0 are possible. The first call to the method always |
| returns <a href="CpuLoadCalculationConstants.html" title="interface in com.ibm.lang.management"><code>CpuLoadCalculationConstants</code></a>.ERROR_VALUE |
| (-1.0), which marks the starting point. If the Java Virtual Machine's recent CPU |
| usage is not available, the method returns a negative error code from |
| <a href="CpuLoadCalculationConstants.html" title="interface in com.ibm.lang.management"><code>CpuLoadCalculationConstants</code></a>.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()" title="class or interface in com.sun.management" class="external-link" target="_blank">getProcessCpuLoad</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html" title="class or interface in com.sun.management" class="external-link" target="_blank">OperatingSystemMXBean</a></code></dd> |
| <dt>Returns:</dt> |
| <dd>A value between 0 and 1.0, or a negative error code from |
| <a href="CpuLoadCalculationConstants.html" title="interface in com.ibm.lang.management"><code>CpuLoadCalculationConstants</code></a> in case |
| of an error. On the first call to the API, |
| <a href="CpuLoadCalculationConstants.html" title="interface in com.ibm.lang.management"><code>CpuLoadCalculationConstants</code></a>.ERROR_VALUE |
| (-1.0) shall be returned.</dd> |
| <dt>Since:</dt> |
| <dd>1.7</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="CpuLoadCalculationConstants.html" title="interface in com.ibm.lang.management"><code>CpuLoadCalculationConstants</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="retrieveTotalProcessorUsage(com.ibm.lang.management.ProcessorUsage)"> |
| <h3>retrieveTotalProcessorUsage</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a></span> <span class="element-name">retrieveTotalProcessorUsage</span><wbr><span class="parameters">(<a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a> procObj)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link" target="_blank">NullPointerException</a>, |
| <a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a></span></div> |
| <div class="block">Returns an updated <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> object that represents the |
| current snapshot of Processor usage statistics. The snapshot is the aggregate of all |
| Processors that are online at the time of sampling.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>procObj</code> - User provided <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> object.</dd> |
| <dt>Returns:</dt> |
| <dd>The updated <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> object.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link" target="_blank">NullPointerException</a></code> - if a null reference is passed as parameter.</dd> |
| <dd><code><a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a></code> - if it failed obtaining Processor usage statistics. |
| |
| <p>In case of an exception, the handler code might use toString() on the exception code |
| to obtain a description of the exception.</p></dd> |
| <dt>Since:</dt> |
| <dd>1.7.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="retrieveTotalProcessorUsage()"> |
| <h3>retrieveTotalProcessorUsage</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a></span> <span class="element-name">retrieveTotalProcessorUsage</span>() |
| throws <span class="exceptions"><a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a></span></div> |
| <div class="block">Instantiate and return a new <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> object that |
| represents the current snapshot of Processor usage statistics. The snapshot is the |
| aggregate of all Processors that are online at the time of sampling.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The new <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> object.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a></code> - if it failed obtaining Processor usage statistics. |
| |
| <p>In case of an exception, the handler code might use toString() on the exception code |
| to obtain a description of the exception.</p></dd> |
| <dt>Since:</dt> |
| <dd>1.7.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="retrieveProcessorUsage(com.ibm.lang.management.ProcessorUsage[])"> |
| <h3>retrieveProcessorUsage</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a>[]</span> <span class="element-name">retrieveProcessorUsage</span><wbr><span class="parameters">(<a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a>[] procArray)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link" target="_blank">NullPointerException</a>, |
| <a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a>, |
| <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link" target="_blank">IllegalArgumentException</a></span></div> |
| <div class="block">Returns an updated array of <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> objects |
| that represent the current snapshot of individual Processor usage times.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>procArray</code> - User provided array of <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> objects.</dd> |
| <dt>Returns:</dt> |
| <dd>The updated array of <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> objects.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link" target="_blank">NullPointerException</a></code> - if a null reference is passed as parameter.</dd> |
| <dd><code><a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a></code> - if it failed obtaining Processor usage statistics.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link" target="_blank">IllegalArgumentException</a></code> - if array provided has insufficient entries and there are more |
| Processors to report on. |
| |
| <p>In case of an exception, the handler code might use toString() on the exception code |
| to obtain a description of the exception.</p></dd> |
| <dt>Since:</dt> |
| <dd>1.7.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="retrieveProcessorUsage()"> |
| <h3>retrieveProcessorUsage</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProcessorUsage.html" title="class in com.ibm.lang.management">ProcessorUsage</a>[]</span> <span class="element-name">retrieveProcessorUsage</span>() |
| throws <span class="exceptions"><a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a></span></div> |
| <div class="block">Instantiates and returns an array of <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> objects |
| that represent the current snapshot of individual Processor usage times.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The new array of <a href="ProcessorUsage.html" title="class in com.ibm.lang.management"><code>ProcessorUsage</code></a> objects.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="ProcessorUsageRetrievalException.html" title="class in com.ibm.lang.management">ProcessorUsageRetrievalException</a></code> - if it failed obtaining Processor usage statistics. |
| |
| <p>In case of an exception, the handler code might use toString() on the exception code |
| to obtain a description of the exception.</p></dd> |
| <dt>Since:</dt> |
| <dd>1.7.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="retrieveMemoryUsage(com.ibm.lang.management.MemoryUsage)"> |
| <h3>retrieveMemoryUsage</h3> |
| <div class="member-signature"><span class="return-type"><a href="MemoryUsage.html" title="class in com.ibm.lang.management">MemoryUsage</a></span> <span class="element-name">retrieveMemoryUsage</span><wbr><span class="parameters">(<a href="MemoryUsage.html" title="class in com.ibm.lang.management">MemoryUsage</a> memObj)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link" target="_blank">NullPointerException</a>, |
| <a href="MemoryUsageRetrievalException.html" title="class in com.ibm.lang.management">MemoryUsageRetrievalException</a></span></div> |
| <div class="block">Returns an updated <a href="MemoryUsage.html" title="class in com.ibm.lang.management"><code>MemoryUsage</code></a> object that represents the |
| current snapshot of Memory usage statistics.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>memObj</code> - User provided <a href="MemoryUsage.html" title="class in com.ibm.lang.management"><code>MemoryUsage</code></a> object.</dd> |
| <dt>Returns:</dt> |
| <dd>The updated <a href="MemoryUsage.html" title="class in com.ibm.lang.management"><code>MemoryUsage</code></a> object.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link" target="_blank">NullPointerException</a></code> - if a null reference is passed as parameter.</dd> |
| <dd><code><a href="MemoryUsageRetrievalException.html" title="class in com.ibm.lang.management">MemoryUsageRetrievalException</a></code> - if it failed obtaining Memory usage statistics. |
| |
| <p>In case of an exception, the handler code might use toString() on the exception code |
| to obtain a description of the exception.</p></dd> |
| <dt>Since:</dt> |
| <dd>1.7.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="retrieveMemoryUsage()"> |
| <h3>retrieveMemoryUsage</h3> |
| <div class="member-signature"><span class="return-type"><a href="MemoryUsage.html" title="class in com.ibm.lang.management">MemoryUsage</a></span> <span class="element-name">retrieveMemoryUsage</span>() |
| throws <span class="exceptions"><a href="MemoryUsageRetrievalException.html" title="class in com.ibm.lang.management">MemoryUsageRetrievalException</a></span></div> |
| <div class="block">Instantiates and returns an instance of <a href="MemoryUsage.html" title="class in com.ibm.lang.management"><code>MemoryUsage</code></a> object |
| that represents the current snapshot of Memory usage statistics.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The new <a href="MemoryUsage.html" title="class in com.ibm.lang.management"><code>MemoryUsage</code></a> object.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="MemoryUsageRetrievalException.html" title="class in com.ibm.lang.management">MemoryUsageRetrievalException</a></code> - if it failed obtaining Memory usage statistics. |
| |
| <p>In case of an exception, the handler code might use toString() on the exception code |
| to obtain a description of the exception.</p></dd> |
| <dt>Since:</dt> |
| <dd>1.7.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getHardwareModel()"> |
| <h3>getHardwareModel</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></span> <span class="element-name">getHardwareModel</span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link" target="_blank">UnsupportedOperationException</a></span></div> |
| <div class="block">Instantiates and returns an instance of a <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank"><code>String</code></a> object containing |
| hardware model information</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The new <a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank"><code>String</code></a> object or NULL in case of an error.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link" target="_blank">UnsupportedOperationException</a></code> - if the operation is not implemented on this platform. |
| UnsupportedOperationException will also be thrown if the operation is implemented but it |
| cannot be performed because the system does not satisfy all the requirements, for example, |
| an OS service is not installed.</dd> |
| <dt>Since:</dt> |
| <dd>1.7</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isHardwareEmulated()"> |
| <h3>isHardwareEmulated</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isHardwareEmulated</span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link" target="_blank">UnsupportedOperationException</a></span></div> |
| <div class="block">Identify whether the underlying hardware is being emulated</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>True if it is possible to identify that the hardware is being emulated. False otherwise.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link" target="_blank">UnsupportedOperationException</a></code> - if the emulated status cannot be determined</dd> |
| <dt>Since:</dt> |
| <dd>1.7</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isProcessRunning(long)"> |
| <h3>isProcessRunning</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">isProcessRunning</span><wbr><span class="parameters">(long pid)</span></div> |
| <div class="block">Indicates if the specified process is running</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>pid</code> - Operating system process ID</dd> |
| <dt>Returns:</dt> |
| <dd>True if the specified process exists</dd> |
| <dt>Since:</dt> |
| <dd>1.8</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><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, 2022 IBM Corp. and others.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |