Interface RuntimeMXBean
- All Superinterfaces:
PlatformManagedObject, RuntimeMXBean
The OpenJ9 extension interface for the runtime system of the virtual machine.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDefines the different states ofgetVMIdleState(). -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:doubleReturns a system load average calculated over the minute preceding the call averaged over the number of CPU available to Java virtual machine process.getVmId()This is provided for the benefit of applications which use attach API to load JVMTI agents into their own JVMs.Returns current JVM Idle state.booleanQuery the state of the Attach API.booleanQuery the state of the Attach API.booleanisVMIdle()Methods declared in interface PlatformManagedObject
getObjectNameModifier and TypeMethodDescriptionReturns anObjectNameinstance representing the object name of this platform managed object.Methods declared in interface RuntimeMXBean
getBootClassPath, getClassPath, getInputArguments, getLibraryPath, getManagementSpecVersion, getName, getPid, getSpecName, getSpecVendor, getSpecVersion, getStartTime, getSystemProperties, getUptime, getVmName, getVmVendor, getVmVersion, isBootClassPathSupportedModifier and TypeMethodDescriptionReturns the boot class path that is used by the bootstrap class loader to search for class files.Returns the Java class path that is used by the system class loader to search for class files.Returns the input arguments passed to the Java virtual machine which does not include the arguments to themainmethod.Returns the Java library path.Returns the version of the specification for the management interface implemented by the running Java virtual machine.getName()Returns the name representing the running Java virtual machine.default longgetPid()Returns the process ID representing the running Java virtual machine.Returns the Java virtual machine specification name.Returns the Java virtual machine specification vendor.Returns the Java virtual machine specification version.longReturns the start time of the Java virtual machine in milliseconds.Returns a map of names and values of all system properties.longReturns the uptime of the Java virtual machine in milliseconds.Returns the Java virtual machine implementation name.Returns the Java virtual machine implementation vendor.Returns the Java virtual machine implementation version.booleanTests if the Java virtual machine supports the boot class path mechanism used by the bootstrap class loader to search for class files.
-
Method Details
-
getCPULoad
double getCPULoad()Returns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:The time-averaged value of the sum of the number of runnable entities running on the available processors and the number of runnable entities ready and queued to run on the available processors. The averaging technique adopted can vary depending on the underlying operating system.
- Returns:
- normally, the system load average as a double. If the system load average is not obtainable (e.g. because the calculation may involve an unacceptable performance impact) then a negative value is returned.
- Since:
- 1.6
- See Also:
-
getVMGeneratedCPULoad
double getVMGeneratedCPULoad()Returns a system load average calculated over the minute preceding the call averaged over the number of CPU available to Java virtual machine process.- Returns:
- A double indicating the average system load per processor. If the system load average is not available, it returns a negative value to indicate this.
-
getVMIdleState
RuntimeMXBean.VMIdleStates getVMIdleState()Returns current JVM Idle state.- Returns:
- JVM idle state value - i.e active / idle
-
isVMIdle
boolean isVMIdle()- Returns:
- true if JVM state is idle. Otherwise returns false
-
isAttachApiInitialized
boolean isAttachApiInitialized()Query the state of the Attach API. Return false if the Attach API is: - still initializing - disabled - terminated by VM shutdown- Returns:
- true if Attach API is initialized
- Since:
- 1.8
-
isAttachApiTerminated
boolean isAttachApiTerminated()Query the state of the Attach API. Return true if the Attach API is: - disabled - terminated by VM shutdown and false if it is - still initializing - initialized and running- Returns:
- true if Attach API is terminated
- Since:
- 1.8
-
getVmId
String getVmId()This is provided for the benefit of applications which use attach API to load JVMTI agents into their own JVMs.- Returns:
- Attach API Virtual Machine ID of this VM
- Since:
- 1.8
-