Skip to content

Type Alias: ContainerdContainerStats ​

ContainerdContainerStats = object

The resources a running (or paused) container uses (ContainerdContainer.stats): its cgroup counters (cgroup v1 or v2), read twice an interval apart to compute its CPU use, and its network interface counters. The counters are cumulative since the container started, except cpu.percent.

Properties ​

blkio ​

blkio: object

Its block device I/O, summed over the devices: the bytes read and written, the read and write operations.

readBytes ​

readBytes: number

readOps ​

readOps: number

writeBytes ​

writeBytes: number

writeOps ​

writeOps: number


cpu ​

cpu: object

Its CPU use; the times are in nanoseconds.

onlineCpus ​

onlineCpus: number

The CPUs of the host (on cgroup v1, the ones its cgroup reports).

percent ​

percent: number

Its CPU use during the sampling interval, in percent of one CPU: 100 is one CPU used all the time, 200 two of them. 0 when the interval is 0.

system ​

system: number

Its CPU time in kernel mode, in nanoseconds.

throttledPeriods ​

throttledPeriods: number

The CFS periods it was throttled in (by its cpus limit).

throttledTime ​

throttledTime: number

The time it was throttled, in nanoseconds.

usage ​

usage: number

Its total CPU time in nanoseconds, in user mode and in kernel mode.

user ​

user: number

Its CPU time in user mode, in nanoseconds.


memory ​

memory: object

Its memory use, in bytes.

cache ​

cache: number

Its page cache (file-backed memory), in bytes.

limit ​

limit: number

Its memory limit in bytes; the host's total memory when it has none.

oomKills ​

oomKills: number

How many times the kernel's OOM killer killed one of its processes.

swap ​

swap: number

The swap it uses, in bytes.

usage ​

usage: number

The memory it uses, page cache included, in bytes.

workingSet ​

workingSet: number

Its usage without the inactive page cache the kernel can reclaim, in bytes (the figure docker stats shows).


networks ​

networks: Record<string, { rxBytes: number; rxDropped: number; rxErrors: number; rxPackets: number; txBytes: number; txDropped: number; txErrors: number; txPackets: number; }>

The counters of its network interfaces by name (eth0), loopback excluded: the bytes, packets, errors and dropped packets received (rx…) and sent (tx…). On the host network, they are the host's interfaces; empty when its process is gone.


pids ​

pids: object

Its processes: current, the processes (and threads) it has; limit, the most it may have, 0 when it has no limit.

current ​

current: number

limit ​

limit: number


read ​

read: Date

When the last sample was read.

Released under the MIT License.