APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.platform

public Class CgroupMetrics

extends Object
implements Metrics
Class Inheritance
All Implemented Interfaces
jdk.internal.platform.Metrics
Known Direct Subclasses
jdk.internal.platform.CgroupV1MetricsImpl
Imports
java.util.Objects

Field Summary

Modifier and TypeField and Description
private final CgroupSubsystem

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long
getBlkIOServiceCount()

Implements jdk.internal.platform.Metrics.getBlkIOServiceCount.

Returns the number of block I/O requests to the disk that have been issued by the Isolation Group.

public long
getBlkIOServiced()

Implements jdk.internal.platform.Metrics.getBlkIOServiced.

Returns the number of block I/O bytes that have been transferred to/from the disk by the Isolation Group.

public long
getCpuNumPeriods()

Implements jdk.internal.platform.Metrics.getCpuNumPeriods.

Returns the number of time-slice periods that have elapsed if a CPU quota has been setup for the Isolation Group

public long
getCpuNumThrottled()

Implements jdk.internal.platform.Metrics.getCpuNumThrottled.

Returns the number of time-slice periods that the group has been throttled or limited due to the group exceeding its quota if a CPU quota has been setup for the Isolation Group.

public long
getCpuPeriod()

Implements jdk.internal.platform.Metrics.getCpuPeriod.

Returns the length of the scheduling period, in microseconds, for processes within the Isolation Group.

public long
getCpuQuota()

Implements jdk.internal.platform.Metrics.getCpuQuota.

Returns the total available run-time allowed, in microseconds, during each scheduling period for all tasks in the Isolation Group.

public int[]
getCpuSetCpus()

Implements jdk.internal.platform.Metrics.getCpuSetCpus.

Returns the CPUS that are available for execution of processes in the current Isolation Group.

public int[]
getCpuSetMems()

Implements jdk.internal.platform.Metrics.getCpuSetMems.

Returns the memory nodes that are available for use by processes in the current Isolation Group.

public long
getCpuShares()

Implements jdk.internal.platform.Metrics.getCpuShares.

Returns the relative weighting of processes with the Isolation Group used for prioritizing the scheduling of processes across all Isolation Groups running on a host.

public long
getCpuSystemUsage()

Implements jdk.internal.platform.Metrics.getCpuSystemUsage.

Returns the aggregate system time, in nanoseconds, consumed by all tasks in the Isolation Group.

public long
getCpuThrottledTime()

Implements jdk.internal.platform.Metrics.getCpuThrottledTime.

Returns the total time duration, in nanoseconds, that the group has been throttled or limited due to the group exceeding its quota if a CPU quota has been setup for the Isolation Group.

public long
getCpuUsage()

Implements jdk.internal.platform.Metrics.getCpuUsage.

Returns the aggregate time, in nanoseconds, consumed by all tasks in the Isolation Group.

public long
getCpuUserUsage()

Implements jdk.internal.platform.Metrics.getCpuUserUsage.

Returns the aggregate user time, in nanoseconds, consumed by all tasks in the Isolation Group.

public long
getEffectiveCpuCount()

Implements jdk.internal.platform.Metrics.getEffectiveCpuCount.

Returns the number of effective processors that this Isolation group has available to it.

public int[]
getEffectiveCpuSetCpus()

Implements jdk.internal.platform.Metrics.getEffectiveCpuSetCpus.

Returns the CPUS that are available and online for execution of processes within the current Isolation Group.

public int[]
getEffectiveCpuSetMems()

Implements jdk.internal.platform.Metrics.getEffectiveCpuSetMems.

Returns the memory nodes that are available and online for use by processes within the current Isolation Group.

public static Metrics
public long
getMemoryAndSwapLimit()

Implements jdk.internal.platform.Metrics.getMemoryAndSwapLimit.

Returns the maximum amount of physical memory and swap space, in bytes, that can be allocated in the Isolation Group.

public long
getMemoryAndSwapUsage()

Implements jdk.internal.platform.Metrics.getMemoryAndSwapUsage.

Returns the amount of physical memory and swap space, in bytes, that is currently allocated in the current Isolation Group.

public long
getMemoryFailCount()

Implements jdk.internal.platform.Metrics.getMemoryFailCount.

Returns the number of times that user memory requests in the Isolation Group have exceeded the memory limit.

public long
getMemoryLimit()

Implements jdk.internal.platform.Metrics.getMemoryLimit.

Returns the maximum amount of physical memory, in bytes, that can be allocated in the Isolation Group.

public long
getMemorySoftLimit()

Implements jdk.internal.platform.Metrics.getMemorySoftLimit.

Returns the hint to the operating system that allows groups to specify the minimum amount of physical memory that they need to achieve reasonable performance in low memory systems.

public long
getMemoryUsage()

Implements jdk.internal.platform.Metrics.getMemoryUsage.

Returns the amount of physical memory, in bytes, that is currently allocated in the current Isolation Group.

public long[]
getPerCpuUsage()

Implements jdk.internal.platform.Metrics.getPerCpuUsage.

Returns the aggregate time, in nanoseconds, consumed by all tasks in the Isolation Group, separated by CPU.

public long
getPidsCurrent()

Implements jdk.internal.platform.Metrics.getPidsCurrent.

Returns the current number of tasks in the Isolation Group.

public long
getPidsMax()

Implements jdk.internal.platform.Metrics.getPidsMax.

Returns the maximum number of tasks that may be created in the Isolation Group.

public String
getProvider()

Implements jdk.internal.platform.Metrics.getProvider.

Returns the interface responsible for providing the platform metrics.

public long
getTcpMemoryUsage()

Implements jdk.internal.platform.Metrics.getTcpMemoryUsage.

Returns the amount of networking physical memory, in bytes, that is currently allocated in the current Isolation Group.

private static native long
private static native long
public boolean
isContainerized()

Implements jdk.internal.platform.Metrics.isContainerized.

Determines whether or not the underlying system has useful metrics (a.k.a. is containerized).

private static native boolean
private static native boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

subsystemback to summary
private final CgroupSubsystem subsystem

Constructor Detail

CgroupMetricsback to summary
pack-priv CgroupMetrics(CgroupSubsystem subsystem)

Method Detail

getBlkIOServiceCountback to summary
public long getBlkIOServiceCount()

Implements jdk.internal.platform.Metrics.getBlkIOServiceCount.

Doc from jdk.internal.platform.Metrics.getBlkIOServiceCount.

Returns the number of block I/O requests to the disk that have been issued by the Isolation Group.

Annotations
@Override
getBlkIOServicedback to summary
public long getBlkIOServiced()

Implements jdk.internal.platform.Metrics.getBlkIOServiced.

Doc from jdk.internal.platform.Metrics.getBlkIOServiced.

Returns the number of block I/O bytes that have been transferred to/from the disk by the Isolation Group.

Annotations
@Override
getCpuNumPeriodsback to summary
public long getCpuNumPeriods()

Implements jdk.internal.platform.Metrics.getCpuNumPeriods.

Doc from jdk.internal.platform.Metrics.getCpuNumPeriods.

Returns the number of time-slice periods that have elapsed if a CPU quota has been setup for the Isolation Group

Annotations
@Override
getCpuNumThrottledback to summary
public long getCpuNumThrottled()

Implements jdk.internal.platform.Metrics.getCpuNumThrottled.

Doc from jdk.internal.platform.Metrics.getCpuNumThrottled.

Returns the number of time-slice periods that the group has been throttled or limited due to the group exceeding its quota if a CPU quota has been setup for the Isolation Group.

Annotations
@Override
getCpuPeriodback to summary
public long getCpuPeriod()

Implements jdk.internal.platform.Metrics.getCpuPeriod.

Doc from jdk.internal.platform.Metrics.getCpuPeriod.

Returns the length of the scheduling period, in microseconds, for processes within the Isolation Group.

Annotations
@Override
getCpuQuotaback to summary
public long getCpuQuota()

Implements jdk.internal.platform.Metrics.getCpuQuota.

Doc from jdk.internal.platform.Metrics.getCpuQuota.

Returns the total available run-time allowed, in microseconds, during each scheduling period for all tasks in the Isolation Group.

Annotations
@Override
getCpuSetCpusback to summary
public int[] getCpuSetCpus()

Implements jdk.internal.platform.Metrics.getCpuSetCpus.

Doc from jdk.internal.platform.Metrics.getCpuSetCpus.

Returns the CPUS that are available for execution of processes in the current Isolation Group. The size of the array is equal to the total number of CPUs and the elements in the array are the physical CPU numbers that are available. Some of the CPUs returned may be offline. To get the current online CPUs, use getEffectiveCpuSetCpus().

Annotations
@Override
getCpuSetMemsback to summary
public int[] getCpuSetMems()

Implements jdk.internal.platform.Metrics.getCpuSetMems.

Doc from jdk.internal.platform.Metrics.getCpuSetMems.

Returns the memory nodes that are available for use by processes in the current Isolation Group. The size of the array is equal to the total number of nodes and the elements in the array are the physical node numbers that are available. Some of the nodes returned may be offline. To get the current online memory nodes, use getEffectiveCpuSetMems().

Annotations
@Override
getCpuSharesback to summary
public long getCpuShares()

Implements jdk.internal.platform.Metrics.getCpuShares.

Doc from jdk.internal.platform.Metrics.getCpuShares.

Returns the relative weighting of processes with the Isolation Group used for prioritizing the scheduling of processes across all Isolation Groups running on a host.

Annotations
@Override
getCpuSystemUsageback to summary
public long getCpuSystemUsage()

Implements jdk.internal.platform.Metrics.getCpuSystemUsage.

Doc from jdk.internal.platform.Metrics.getCpuSystemUsage.

Returns the aggregate system time, in nanoseconds, consumed by all tasks in the Isolation Group.

Annotations
@Override
getCpuThrottledTimeback to summary
public long getCpuThrottledTime()

Implements jdk.internal.platform.Metrics.getCpuThrottledTime.

Doc from jdk.internal.platform.Metrics.getCpuThrottledTime.

Returns the total time duration, in nanoseconds, that the group has been throttled or limited due to the group exceeding its quota if a CPU quota has been setup for the Isolation Group.

Annotations
@Override
getCpuUsageback to summary
public long getCpuUsage()

Implements jdk.internal.platform.Metrics.getCpuUsage.

Doc from jdk.internal.platform.Metrics.getCpuUsage.

Returns the aggregate time, in nanoseconds, consumed by all tasks in the Isolation Group.

Annotations
@Override
getCpuUserUsageback to summary
public long getCpuUserUsage()

Implements jdk.internal.platform.Metrics.getCpuUserUsage.

Doc from jdk.internal.platform.Metrics.getCpuUserUsage.

Returns the aggregate user time, in nanoseconds, consumed by all tasks in the Isolation Group.

Annotations
@Override
getEffectiveCpuCountback to summary
public long getEffectiveCpuCount()

Implements jdk.internal.platform.Metrics.getEffectiveCpuCount.

Doc from jdk.internal.platform.Metrics.getEffectiveCpuCount.

Returns the number of effective processors that this Isolation group has available to it. This effective processor count is computed based on the number of dedicated CPUs, CPU shares and CPU quotas in effect for this isolation group. This method returns the same value as java.lang.Runtime#availableProcessors().

Annotations
@Override
getEffectiveCpuSetCpusback to summary
public int[] getEffectiveCpuSetCpus()

Implements jdk.internal.platform.Metrics.getEffectiveCpuSetCpus.

Doc from jdk.internal.platform.Metrics.getEffectiveCpuSetCpus.

Returns the CPUS that are available and online for execution of processes within the current Isolation Group. The size of the array is equal to the total number of CPUs and the elements in the array are the physical CPU numbers.

Annotations
@Override
getEffectiveCpuSetMemsback to summary
public int[] getEffectiveCpuSetMems()

Implements jdk.internal.platform.Metrics.getEffectiveCpuSetMems.

Doc from jdk.internal.platform.Metrics.getEffectiveCpuSetMems.

Returns the memory nodes that are available and online for use by processes within the current Isolation Group. The size of the array is equal to the total number of nodes and the elements in the array are the physical node numbers.

Annotations
@Override
getInstanceback to summary
public static Metrics getInstance()
getMemoryAndSwapLimitback to summary
public long getMemoryAndSwapLimit()

Implements jdk.internal.platform.Metrics.getMemoryAndSwapLimit.

Doc from jdk.internal.platform.Metrics.getMemoryAndSwapLimit.

Returns the maximum amount of physical memory and swap space, in bytes, that can be allocated in the Isolation Group.

Annotations
@Override
getMemoryAndSwapUsageback to summary
public long getMemoryAndSwapUsage()

Implements jdk.internal.platform.Metrics.getMemoryAndSwapUsage.

Doc from jdk.internal.platform.Metrics.getMemoryAndSwapUsage.

Returns the amount of physical memory and swap space, in bytes, that is currently allocated in the current Isolation Group.

Annotations
@Override
getMemoryFailCountback to summary
public long getMemoryFailCount()

Implements jdk.internal.platform.Metrics.getMemoryFailCount.

Doc from jdk.internal.platform.Metrics.getMemoryFailCount.

Returns the number of times that user memory requests in the Isolation Group have exceeded the memory limit.

getMemoryLimitback to summary
public long getMemoryLimit()

Implements jdk.internal.platform.Metrics.getMemoryLimit.

Doc from jdk.internal.platform.Metrics.getMemoryLimit.

Returns the maximum amount of physical memory, in bytes, that can be allocated in the Isolation Group.

Annotations
@Override
getMemorySoftLimitback to summary
public long getMemorySoftLimit()

Implements jdk.internal.platform.Metrics.getMemorySoftLimit.

Doc from jdk.internal.platform.Metrics.getMemorySoftLimit.

Returns the hint to the operating system that allows groups to specify the minimum amount of physical memory that they need to achieve reasonable performance in low memory systems. This allows host systems to provide greater sharing of memory.

Annotations
@Override
getMemoryUsageback to summary
public long getMemoryUsage()

Implements jdk.internal.platform.Metrics.getMemoryUsage.

Doc from jdk.internal.platform.Metrics.getMemoryUsage.

Returns the amount of physical memory, in bytes, that is currently allocated in the current Isolation Group.

Annotations
@Override
getPerCpuUsageback to summary
public long[] getPerCpuUsage()

Implements jdk.internal.platform.Metrics.getPerCpuUsage.

Doc from jdk.internal.platform.Metrics.getPerCpuUsage.

Returns the aggregate time, in nanoseconds, consumed by all tasks in the Isolation Group, separated by CPU. If the current process is running within a container, the reported time will only be valid for processes running within the same container. The values are returned in an array, one entry for each physical processor on the system. Time values for processors unavailable to this Group are undefined.

Annotations
@Override
getPidsCurrentback to summary
public long getPidsCurrent()

Implements jdk.internal.platform.Metrics.getPidsCurrent.

Doc from jdk.internal.platform.Metrics.getPidsCurrent.

Returns the current number of tasks in the Isolation Group.

Annotations
@Override
getPidsMaxback to summary
public long getPidsMax()

Implements jdk.internal.platform.Metrics.getPidsMax.

Doc from jdk.internal.platform.Metrics.getPidsMax.

Returns the maximum number of tasks that may be created in the Isolation Group.

Annotations
@Override
getProviderback to summary
public String getProvider()

Implements jdk.internal.platform.Metrics.getProvider.

Doc from jdk.internal.platform.Metrics.getProvider.

Returns the interface responsible for providing the platform metrics.

Annotations
@Override
getTcpMemoryUsageback to summary
public long getTcpMemoryUsage()

Implements jdk.internal.platform.Metrics.getTcpMemoryUsage.

Doc from jdk.internal.platform.Metrics.getTcpMemoryUsage.

Returns the amount of networking physical memory, in bytes, that is currently allocated in the current Isolation Group.

Annotations
@Override
getTotalMemorySize0back to summary
private static native long getTotalMemorySize0()
getTotalSwapSize0back to summary
private static native long getTotalSwapSize0()
isContainerizedback to summary
public boolean isContainerized()

Implements jdk.internal.platform.Metrics.isContainerized.

Doc from jdk.internal.platform.Metrics.isContainerized.

Determines whether or not the underlying system has useful metrics (a.k.a. is containerized).

Annotations
@Override
isContainerized0back to summary
private static native boolean isContainerized0()
isUseContainerSupportback to summary
private static native boolean isUseContainerSupport()