Docker CPU Metrics

Collected Metrics

Fully Qualified Name(FQN)

Type

Units

Statistic*

BASE

CORR

Description

cpu.cpu_usage.percpu_usage*

COUNTER

nanoseconds

yes

no

Each CPU has a separate metric which tracks the number of nanoseconds that that specific CPU has been used since the container was started.

cpu.cpu_usage.total_usage

COUNTER

nanoseconds

yes

no

This metric is the sum of all of the per-CPU usage metrics. Thus, it represents the total number of nanoseconds that all CPUs have been in use since the container was started. It is important to bear in mind that there could be overlap. In other words, if this metric shows 10 seconds of CPU usage, it could be that both CPUs were busy for the same 5 seconds of time.

cpu.cpu_usage.usage_in_kernelmode

COUNTER

nanoseconds

yes

no

This is the number of nanoseconds of total_usage that was spent on kernel (OS) level threads.

cpu.cpu_usage.usage_in_usermode

COUNTER

nanoseconds

yes

no

This is the number of nanoseconds of total_usage that was spent on user threads.

cpu.system_cpu_usage

COUNTER

nanoseconds

yes

no

This metric is a little confusing, as it is the number of nanseconds used by the host since the host started; however, it is the sum of all CPU metrics, including idle, so it should be increasing at a constant rate. Put another way, when doing the deltas between intervals, the value should always be equal to the interval length times the number of CPUs. In practice, the number is always a bit less than this and experiences variations, possibly due to measurement error.

cpu.throttling_data.periods

COUNTER

count

yes

no

The number of “periods” during which the CPU for the container could have been thottled. If throttling is not enabled for the container, this value will always be 0.

cpu.throttling_data.throttled_periods

COUNTER

count

no

no

The number of “periods” during which the CPU for the container actuallywas thottled. If throttling is not enabled for the container, this value will always be 0. In all cases, this value will be less than or equal to the periods metric.

cpu.throttling_data.throttled_time

COUNTER

count

no

no

“The amount of time in nanoseconds taht the container has spent being throttled.”