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

public Class CgroupV1Subsystem

extends Object
implements CgroupSubsystem, CgroupV1Metrics
Class Inheritance
All Implemented Interfaces
jdk.internal.platform.CgroupV1Metrics, jdk.internal.platform.Metrics, jdk.internal.platform.CgroupSubsystem
Imports
java.util.Map, jdk.internal.platform.CgroupInfo, .CgroupSubsystem, .CgroupSubsystemController, .CgroupV1Metrics

Field Summary

Modifier and TypeField and Description
private CgroupV1SubsystemController
private CgroupV1SubsystemController
private CgroupV1SubsystemController
private CgroupV1SubsystemController
private static volatile CgroupV1Subsystem
private CgroupV1MemorySubSystemController
private CgroupV1SubsystemController
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public long
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
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[]
public double
getCpuSetMemoryPressure()

Implements jdk.internal.platform.CgroupV1Metrics.getCpuSetMemoryPressure.

Returns the (attempts per second * 1000), if enabled, that the operating system tries to satisfy a memory request for any process in the current Isolation Group when no free memory is readily available.

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.

CPU Accounting Subsystem

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.

private static boolean
public static CgroupV1Subsystem

Returns:

A singleton CgroupV1Subsystem instance, never null
getInstance
(Map<String, CgroupInfo> infos)

Get a singleton instance of CgroupV1Subsystem.

public long
getKernelMemoryFailCount()

Implements jdk.internal.platform.CgroupV1Metrics.getKernelMemoryFailCount.

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

public long
getKernelMemoryMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getKernelMemoryMaxUsage.

Returns the largest amount of kernel physical memory, in bytes, that have been allocated in the Isolation Group.

public long
getKernelMemoryUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getKernelMemoryUsage.

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

private static long
public long
getMemoryAndSwapFailCount()

Implements jdk.internal.platform.CgroupV1Metrics.getMemoryAndSwapFailCount.

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

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
getMemoryAndSwapMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getMemoryAndSwapMaxUsage.

Returns the largest amount of physical memory and swap space, in bytes, that have been 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
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
getMemoryMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getMemoryMaxUsage.

Returns the largest amount of physical memory, in bytes, that have been 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
public String
getProvider()

Implements jdk.internal.platform.Metrics.getProvider.

Returns the interface responsible for providing the platform metrics.

private static boolean
public long
getTcpMemoryFailCount()

Implements jdk.internal.platform.CgroupV1Metrics.getTcpMemoryFailCount.

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

public long
getTcpMemoryMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getTcpMemoryMaxUsage.

Returns the largest amount of networking physical memory, in bytes, that have been allocated in the Isolation Group.

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 CgroupV1Subsystem
public Boolean
isCpuSetMemoryPressureEnabled()

Implements jdk.internal.platform.CgroupV1Metrics.isCpuSetMemoryPressureEnabled.

Returns the state of the memory pressure detection support.

public Boolean
isMemoryOOMKillEnabled()

Implements jdk.internal.platform.CgroupV1Metrics.isMemoryOOMKillEnabled.

Returns the state of the Operating System Out of Memory termination policy.

private void
private void
private void
private void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blkioback to summary
private CgroupV1SubsystemController blkio
cpuback to summary
private CgroupV1SubsystemController cpu
cpuacctback to summary
private CgroupV1SubsystemController cpuacct
cpusetback to summary
private CgroupV1SubsystemController cpuset
INSTANCEback to summary
private static volatile CgroupV1Subsystem INSTANCE
memoryback to summary
private CgroupV1MemorySubSystemController memory
pidsback to summary
private CgroupV1SubsystemController pids
PROVIDER_NAMEback to summary
private static final String PROVIDER_NAME

Constructor Detail

CgroupV1Subsystemback to summary
private CgroupV1Subsystem()

Method Detail

getBlkIOServiceCountback to summary
public long getBlkIOServiceCount()

Implements jdk.internal.platform.Metrics.getBlkIOServiceCount.

BlKIO Subsystem

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.

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

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.

getCpuPeriodback to summary
public long getCpuPeriod()

Implements jdk.internal.platform.Metrics.getCpuPeriod.

CPU Subsystem

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.

getCpuSetCpusback to summary
public int[] getCpuSetCpus()

Implements jdk.internal.platform.Metrics.getCpuSetCpus.

CPUSet Subsystem

getCpuSetMemoryPressureback to summary
public double getCpuSetMemoryPressure()

Implements jdk.internal.platform.CgroupV1Metrics.getCpuSetMemoryPressure.

Doc from jdk.internal.platform.CgroupV1Metrics.getCpuSetMemoryPressure.

Returns the (attempts per second * 1000), if enabled, that the operating system tries to satisfy a memory request for any process in the current Isolation Group when no free memory is readily available. Use isCpuSetMemoryPressureEnabled() to determine if this support is enabled.

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().

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.

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.

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.

getCpuUsageback to summary
public long getCpuUsage()

Implements jdk.internal.platform.Metrics.getCpuUsage.

CPU Accounting Subsystem

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.

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().

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.

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.

getHierarchicalback to summary
private static boolean getHierarchical(CgroupV1MemorySubSystemController controller)
getInstanceback to summary
public static CgroupV1Subsystem getInstance(Map<String, CgroupInfo> infos)

Get a singleton instance of CgroupV1Subsystem. Initially, it creates a new object by retrieving the pre-parsed information from cgroup interface files from the provided 'infos' map. See CgroupSubsystemFactory.determineType() where the actual parsing of cgroup interface files happens.

Returns:CgroupV1Subsystem

A singleton CgroupV1Subsystem instance, never null

getKernelMemoryFailCountback to summary
public long getKernelMemoryFailCount()

Implements jdk.internal.platform.CgroupV1Metrics.getKernelMemoryFailCount.

Doc from jdk.internal.platform.CgroupV1Metrics.getKernelMemoryFailCount.

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

getKernelMemoryMaxUsageback to summary
public long getKernelMemoryMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getKernelMemoryMaxUsage.

Doc from jdk.internal.platform.CgroupV1Metrics.getKernelMemoryMaxUsage.

Returns the largest amount of kernel physical memory, in bytes, that have been allocated in the Isolation Group.

getKernelMemoryUsageback to summary
public long getKernelMemoryUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getKernelMemoryUsage.

Doc from jdk.internal.platform.CgroupV1Metrics.getKernelMemoryUsage.

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

getLongValueback to summary
private static long getLongValue(CgroupSubsystemController controller, String param)
getMemoryAndSwapFailCountback to summary
public long getMemoryAndSwapFailCount()

Implements jdk.internal.platform.CgroupV1Metrics.getMemoryAndSwapFailCount.

Doc from jdk.internal.platform.CgroupV1Metrics.getMemoryAndSwapFailCount.

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

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.

getMemoryAndSwapMaxUsageback to summary
public long getMemoryAndSwapMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getMemoryAndSwapMaxUsage.

Doc from jdk.internal.platform.CgroupV1Metrics.getMemoryAndSwapMaxUsage.

Returns the largest amount of physical memory and swap space, in bytes, that have been allocated in the Isolation Group.

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.

getMemoryFailCountback to summary
public long getMemoryFailCount()

Implements jdk.internal.platform.Metrics.getMemoryFailCount.

Memory Subsystem

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.

getMemoryMaxUsageback to summary
public long getMemoryMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getMemoryMaxUsage.

Doc from jdk.internal.platform.CgroupV1Metrics.getMemoryMaxUsage.

Returns the largest amount of physical memory, in bytes, that have been allocated in the Isolation Group.

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.

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.

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.

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.

getPidsMaxback to summary
public long getPidsMax()

Implements jdk.internal.platform.Metrics.getPidsMax.

pids subsystem

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.

getSwapEnabledback to summary
private static boolean getSwapEnabled(CgroupV1MemorySubSystemController controller)
getTcpMemoryFailCountback to summary
public long getTcpMemoryFailCount()

Implements jdk.internal.platform.CgroupV1Metrics.getTcpMemoryFailCount.

Doc from jdk.internal.platform.CgroupV1Metrics.getTcpMemoryFailCount.

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

getTcpMemoryMaxUsageback to summary
public long getTcpMemoryMaxUsage()

Implements jdk.internal.platform.CgroupV1Metrics.getTcpMemoryMaxUsage.

Doc from jdk.internal.platform.CgroupV1Metrics.getTcpMemoryMaxUsage.

Returns the largest amount of networking physical memory, in bytes, that have been allocated in the Isolation Group.

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.

initSubSystemback to summary
private static CgroupV1Subsystem initSubSystem(Map<String, CgroupInfo> infos)
isCpuSetMemoryPressureEnabledback to summary
public Boolean isCpuSetMemoryPressureEnabled()

Implements jdk.internal.platform.CgroupV1Metrics.isCpuSetMemoryPressureEnabled.

Doc from jdk.internal.platform.CgroupV1Metrics.isCpuSetMemoryPressureEnabled.

Returns the state of the memory pressure detection support.

isMemoryOOMKillEnabledback to summary
public Boolean isMemoryOOMKillEnabled()

Implements jdk.internal.platform.CgroupV1Metrics.isMemoryOOMKillEnabled.

Doc from jdk.internal.platform.CgroupV1Metrics.isMemoryOOMKillEnabled.

Returns the state of the Operating System Out of Memory termination policy.

setBlkIOControllerback to summary
private void setBlkIOController(CgroupV1SubsystemController blkio)
setCpuAcctControllerback to summary
private void setCpuAcctController(CgroupV1SubsystemController cpuacct)
setCpuControllerback to summary
private void setCpuController(CgroupV1SubsystemController cpu)
setCpuSetControllerback to summary
private void setCpuSetController(CgroupV1SubsystemController cpuset)
setMemorySubSystemback to summary
private void setMemorySubSystem(CgroupV1MemorySubSystemController memory)
setPidsControllerback to summary
private void setPidsController(CgroupV1SubsystemController pids)