java.lang.Object
org.elasticsearch.monitor.os.OsStats.Cgroup
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
- Enclosing class:
OsStats
Encapsulates basic cgroup statistics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEncapsulates CPU time statistics.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionCgroup(String cpuAcctControlGroup, BigInteger cpuAcctUsageNanos, String cpuControlGroup, long cpuCfsPeriodMicros, long cpuCfsQuotaMicros, OsStats.Cgroup.CpuStat cpuStat, String memoryControlGroup, String memoryLimitInBytes, String memoryUsageInBytes) -
Method Summary
Modifier and TypeMethodDescriptionThe control group for thecpuacctsubsystem.The total CPU time consumed by all tasks in thecpuacctcontrol group fromcpuAcctControlGroup.longThe period of time for how frequently the control group fromcpuControlGrouphas its access to CPU resources reallocated.longThe total amount of time for which all tasks in the control group fromcpuControlGroupcan run in one period as represented bycpuCfsPeriodMicros.The control group for thecpusubsystem.The CPU time statistics.The control group for thememorysubsystem.The maximum amount of user memory (including file cache).The total current memory usage by processes in the cgroup (in bytes).toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
Cgroup
public Cgroup(String cpuAcctControlGroup, BigInteger cpuAcctUsageNanos, String cpuControlGroup, long cpuCfsPeriodMicros, long cpuCfsQuotaMicros, OsStats.Cgroup.CpuStat cpuStat, String memoryControlGroup, String memoryLimitInBytes, String memoryUsageInBytes)
-
-
Method Details
-
getCpuAcctControlGroup
The control group for thecpuacctsubsystem.- Returns:
- the control group
-
getCpuAcctUsageNanos
The total CPU time consumed by all tasks in thecpuacctcontrol group fromcpuAcctControlGroup.- Returns:
- the total CPU time in nanoseconds
-
getCpuControlGroup
The control group for thecpusubsystem.- Returns:
- the control group
-
getCpuCfsPeriodMicros
public long getCpuCfsPeriodMicros()The period of time for how frequently the control group fromcpuControlGrouphas its access to CPU resources reallocated.- Returns:
- the period of time in microseconds
-
getCpuCfsQuotaMicros
public long getCpuCfsQuotaMicros()The total amount of time for which all tasks in the control group fromcpuControlGroupcan run in one period as represented bycpuCfsPeriodMicros.- Returns:
- the total amount of time in microseconds
-
getCpuStat
The CPU time statistics. SeeOsStats.Cgroup.CpuStat.- Returns:
- the CPU time statistics.
-
getMemoryControlGroup
The control group for thememorysubsystem.- Returns:
- the control group
-
getMemoryLimitInBytes
The maximum amount of user memory (including file cache). This is stored as aStringbecause the value can be too big to fit in along. (The alternative would have beenBigIntegerbut then it would not be possible to index the OS stats document into Elasticsearch without losing information, asBigIntegeris not a supported Elasticsearch type.)- Returns:
- the maximum amount of user memory (including file cache).
-
getMemoryUsageInBytes
The total current memory usage by processes in the cgroup (in bytes). This is stored as aStringfor consistency withmemoryLimitInBytes.- Returns:
- the total current memory usage by processes in the cgroup (in bytes).
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-