APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.management.internal

pack-priv Class OperatingSystemImpl

extends BaseOperatingSystemImpl
implements UnixOperatingSystemMXBean
Class Inheritance
All Implemented Interfaces
com.sun.management.UnixOperatingSystemMXBean, com.sun.management.OperatingSystemMXBean, java.lang.management.OperatingSystemMXBean, java.lang.management.PlatformManagedObject
Imports
java.util.concurrent.TimeUnit, java.util.function.DoubleSupplier, .LongSupplier, .ToDoubleFunction, jdk.internal.platform.Metrics, sun.management.BaseOperatingSystemImpl, .VMManagement

Implementation class for the operating system. Standard and committed hotspot-specific metrics if any. ManagementFactory.getOperatingSystemMXBean() returns an instance of this class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract class
private class
private class

Field Summary

Modifier and TypeField and Description
private final Metrics
private static final int
private OperatingSystemImpl.ContainerCpuTicks
private OperatingSystemImpl.ContainerCpuTicks

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long
getCommittedVirtualMemorySize()

Implements com.sun.management.OperatingSystemMXBean.getCommittedVirtualMemorySize.

Returns the amount of virtual memory that is guaranteed to be available to the running process in bytes, or -1 if this operation is not supported.

private native long
public double
getCpuLoad()

Implements com.sun.management.OperatingSystemMXBean.getCpuLoad.

Returns the "recent CPU usage" for the operating environment.

private native double
public long
getFreeMemorySize()

Implements com.sun.management.OperatingSystemMXBean.getFreeMemorySize.

Returns the amount of free memory in bytes.

private native long
public long
getFreeSwapSpaceSize()

Implements com.sun.management.OperatingSystemMXBean.getFreeSwapSpaceSize.

Returns the amount of free swap space in bytes.

private native long
private native int
private native int
private native long
public long
private native long
public long
private native long
public double
getProcessCpuLoad()

Implements com.sun.management.OperatingSystemMXBean.getProcessCpuLoad.

Returns the "recent CPU usage" for the Java Virtual Machine process.

private native double
public long
getProcessCpuTime()

Implements com.sun.management.OperatingSystemMXBean.getProcessCpuTime.

Returns the CPU time used by the process on which the Java virtual machine is running in nanoseconds.

private native long
private native double
getSingleCpuLoad0(int cpuNum)

public long
getTotalMemorySize()

Implements com.sun.management.OperatingSystemMXBean.getTotalMemorySize.

Returns the total amount of memory in bytes.

private native long
public long
getTotalSwapSpaceSize()

Implements com.sun.management.OperatingSystemMXBean.getTotalSwapSpaceSize.

Returns the total amount of swap space in bytes.

private native long
private static native void
private boolean
Inherited from sun.management.BaseOperatingSystemImpl:
getArchgetAvailableProcessorsgetNamegetObjectNamegetSystemLoadAveragegetVersion

Field Detail

containerMetricsback to summary
private final Metrics containerMetrics
MAX_ATTEMPTS_NUMBERback to summary
private static final int MAX_ATTEMPTS_NUMBER
processLoadTicksback to summary
private OperatingSystemImpl.ContainerCpuTicks processLoadTicks
systemLoadTicksback to summary
private OperatingSystemImpl.ContainerCpuTicks systemLoadTicks

Constructor Detail

OperatingSystemImplback to summary
pack-priv OperatingSystemImpl(VMManagement vm)

Method Detail

getCommittedVirtualMemorySizeback to summary
public long getCommittedVirtualMemorySize()

Implements com.sun.management.OperatingSystemMXBean.getCommittedVirtualMemorySize.

Doc from com.sun.management.OperatingSystemMXBean.getCommittedVirtualMemorySize.

Returns the amount of virtual memory that is guaranteed to be available to the running process in bytes, or -1 if this operation is not supported.

getCommittedVirtualMemorySize0back to summary
private native long getCommittedVirtualMemorySize0()
getCpuLoadback to summary
public double getCpuLoad()

Implements com.sun.management.OperatingSystemMXBean.getCpuLoad.

Doc from com.sun.management.OperatingSystemMXBean.getCpuLoad.

Returns the "recent CPU usage" for the operating environment. This value is a double in the [0.0,1.0] interval. A value of 0.0 means that all CPUs were idle during the recent period of time observed, while a value of 1.0 means that all CPUs were actively running 100% of the time during the recent period being observed. The recent period of observation is implementation-specific, and typically relates to the duration since the last call made to this method, or getSystemCpuLoad(). For the very first invocation, the recent period of observation is undefined. All values between 0.0 and 1.0 are possible dependent on the activities going on. If the recent CPU usage is not available, the method returns a negative value.

getCpuLoad0back to summary
private native double getCpuLoad0()
getFreeMemorySizeback to summary
public long getFreeMemorySize()

Implements com.sun.management.OperatingSystemMXBean.getFreeMemorySize.

Doc from com.sun.management.OperatingSystemMXBean.getFreeMemorySize.

Returns the amount of free memory in bytes.

getFreeMemorySize0back to summary
private native long getFreeMemorySize0()
getFreeSwapSpaceSizeback to summary
public long getFreeSwapSpaceSize()

Implements com.sun.management.OperatingSystemMXBean.getFreeSwapSpaceSize.

Doc from com.sun.management.OperatingSystemMXBean.getFreeSwapSpaceSize.

Returns the amount of free swap space in bytes.

getFreeSwapSpaceSize0back to summary
private native long getFreeSwapSpaceSize0()
getHostConfiguredCpuCount0back to summary
private native int getHostConfiguredCpuCount0()
getHostOnlineCpuCount0back to summary
private native int getHostOnlineCpuCount0()
getHostTotalCpuTicks0back to summary
private native long getHostTotalCpuTicks0()
getMaxFileDescriptorCountback to summary
public long getMaxFileDescriptorCount()

Implements com.sun.management.UnixOperatingSystemMXBean.getMaxFileDescriptorCount.

Doc from com.sun.management.UnixOperatingSystemMXBean.getMaxFileDescriptorCount.

Returns the maximum number of file descriptors.

getMaxFileDescriptorCount0back to summary
private native long getMaxFileDescriptorCount0()
getOpenFileDescriptorCountback to summary
public long getOpenFileDescriptorCount()

Implements com.sun.management.UnixOperatingSystemMXBean.getOpenFileDescriptorCount.

Doc from com.sun.management.UnixOperatingSystemMXBean.getOpenFileDescriptorCount.

Returns the number of open file descriptors.

getOpenFileDescriptorCount0back to summary
private native long getOpenFileDescriptorCount0()
getProcessCpuLoadback to summary
public double getProcessCpuLoad()

Implements com.sun.management.OperatingSystemMXBean.getProcessCpuLoad.

Doc from com.sun.management.OperatingSystemMXBean.getProcessCpuLoad.

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 being observed. Threads from the JVM include the application threads as well as the JVM internal threads. The recent period of observation is implementation-specific, and typically relates to the duration since the last call made to this method. For the very first invocation, the recent period of observation is undefined. All values between 0.0 and 1.0 are possible dependent on the activities going on in the JVM process and the whole system. If the Java Virtual Machine recent CPU usage is not available, the method returns a negative value.

getProcessCpuLoad0back to summary
private native double getProcessCpuLoad0()
getProcessCpuTimeback to summary
public long getProcessCpuTime()

Implements com.sun.management.OperatingSystemMXBean.getProcessCpuTime.

Doc from com.sun.management.OperatingSystemMXBean.getProcessCpuTime.

Returns the CPU time used by the process on which the Java virtual machine is running in nanoseconds. The returned value is of nanoseconds precision but not necessarily nanoseconds accuracy. This method returns -1 if the the platform does not support this operation.

getProcessCpuTime0back to summary
private native long getProcessCpuTime0()
getSingleCpuLoad0back to summary
private native double getSingleCpuLoad0(int cpuNum)
getTotalMemorySizeback to summary
public long getTotalMemorySize()

Implements com.sun.management.OperatingSystemMXBean.getTotalMemorySize.

Doc from com.sun.management.OperatingSystemMXBean.getTotalMemorySize.

Returns the total amount of memory in bytes.

getTotalMemorySize0back to summary
private native long getTotalMemorySize0()
getTotalSwapSpaceSizeback to summary
public long getTotalSwapSpaceSize()

Implements com.sun.management.OperatingSystemMXBean.getTotalSwapSpaceSize.

Doc from com.sun.management.OperatingSystemMXBean.getTotalSwapSpaceSize.

Returns the total amount of swap space in bytes.

getTotalSwapSpaceSize0back to summary
private native long getTotalSwapSpaceSize0()
initialize0back to summary
private static native void initialize0()
isCpuSetSameAsHostCpuSetback to summary
private boolean isCpuSetSameAsHostCpuSet()
com.sun.management.internal back to summary

private abstract Class OperatingSystemImpl.ContainerCpuTicks

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks
Known Direct Subclasses
com.sun.management.internal.OperatingSystemImpl.ProcessCpuTicks, com.sun.management.internal.OperatingSystemImpl.SystemCpuTicks

Field Summary

Modifier and TypeField and Description
private volatile long
private volatile long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected abstract ToDoubleFunction<int[]>
protected abstract LongSupplier
protected abstract DoubleSupplier
public double
private double
getUsageDividesTotal(long usageTicks, long totalTicks)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

totalTicksback to summary
private volatile long totalTicks
usageTicksback to summary
private volatile long usageTicks

Constructor Detail

ContainerCpuTicksback to summary
private ContainerCpuTicks()

Method Detail

cpuSetCalcback to summary
protected abstract ToDoubleFunction<int[]> cpuSetCalc()
cpuUsageSupplierback to summary
protected abstract LongSupplier cpuUsageSupplier()
defaultCpuLoadSupplierback to summary
protected abstract DoubleSupplier defaultCpuLoadSupplier()
getContainerCpuLoadback to summary
public double getContainerCpuLoad()
getUsageDividesTotalback to summary
private double getUsageDividesTotal(long usageTicks, long totalTicks)
com.sun.management.internal back to summary

private Class OperatingSystemImpl.ProcessCpuTicks

extends ContainerCpuTicks
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected ToDoubleFunction<int[]>
protected LongSupplier
protected DoubleSupplier
Inherited from com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks:
getContainerCpuLoad

Constructor Detail

ProcessCpuTicksback to summary
private ProcessCpuTicks()

Method Detail

cpuSetCalcback to summary
protected ToDoubleFunction<int[]> cpuSetCalc()

Implements abstract com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks.cpuSetCalc.

Annotations
@Override
cpuUsageSupplierback to summary
protected LongSupplier cpuUsageSupplier()

Implements abstract com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks.cpuUsageSupplier.

Annotations
@Override
defaultCpuLoadSupplierback to summary
protected DoubleSupplier defaultCpuLoadSupplier()

Implements abstract com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks.defaultCpuLoadSupplier.

Annotations
@Override
com.sun.management.internal back to summary

private Class OperatingSystemImpl.SystemCpuTicks

extends ContainerCpuTicks
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected ToDoubleFunction<int[]>
protected LongSupplier
protected DoubleSupplier
Inherited from com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks:
getContainerCpuLoad

Constructor Detail

SystemCpuTicksback to summary
private SystemCpuTicks()

Method Detail

cpuSetCalcback to summary
protected ToDoubleFunction<int[]> cpuSetCalc()

Implements abstract com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks.cpuSetCalc.

Annotations
@Override
cpuUsageSupplierback to summary
protected LongSupplier cpuUsageSupplier()

Implements abstract com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks.cpuUsageSupplier.

Annotations
@Override
defaultCpuLoadSupplierback to summary
protected DoubleSupplier defaultCpuLoadSupplier()

Implements abstract com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks.defaultCpuLoadSupplier.

Annotations
@Override