Search or ask Docker

ContainerCPUUsage

ContainerCPUUsage schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

All CPU stats aggregated since container inception.
percpu_usage

Type: array

Total CPU time (in nanoseconds) consumed per core (Linux).

This field is Linux-specific when using cgroups v1. It is omitted when using cgroups v2 and Windows containers.

Array item

Type: integer

All schema constraints and annotations
{
  "example": 29912000,
  "format": "uint64",
  "type": "integer"
}
All schema constraints and annotations
{
  "description": "Total CPU time (in nanoseconds) consumed per core (Linux).\n\nThis field is Linux-specific when using cgroups v1. It is omitted\nwhen using cgroups v2 and Windows containers.\n",
  "items": {
    "example": 29912000,
    "format": "uint64",
    "type": "integer"
  },
  "type": "array",
  "x-nullable": true
}
total_usage

Type: integer

Total CPU time consumed in nanoseconds (Linux) or 100's of nanoseconds (Windows).
All schema constraints and annotations
{
  "description": "Total CPU time consumed in nanoseconds (Linux) or 100's of nanoseconds (Windows).\n",
  "example": 29912000,
  "format": "uint64",
  "type": "integer"
}
usage_in_kernelmode

Type: integer

Time (in nanoseconds) spent by tasks of the cgroup in kernel mode (Linux), or time spent (in 100's of nanoseconds) by all container processes in kernel mode (Windows).

Not populated for Windows containers using Hyper-V isolation.

All schema constraints and annotations
{
  "description": "Time (in nanoseconds) spent by tasks of the cgroup in kernel mode (Linux),\nor time spent (in 100's of nanoseconds) by all container processes in\nkernel mode (Windows).\n\nNot populated for Windows containers using Hyper-V isolation.\n",
  "example": 21994000,
  "format": "uint64",
  "type": "integer"
}
usage_in_usermode

Type: integer

Time (in nanoseconds) spent by tasks of the cgroup in user mode (Linux), or time spent (in 100's of nanoseconds) by all container processes in kernel mode (Windows).

Not populated for Windows containers using Hyper-V isolation.

All schema constraints and annotations
{
  "description": "Time (in nanoseconds) spent by tasks of the cgroup in user mode (Linux),\nor time spent (in 100's of nanoseconds) by all container processes in\nkernel mode (Windows).\n\nNot populated for Windows containers using Hyper-V isolation.\n",
  "example": 7918000,
  "format": "uint64",
  "type": "integer"
}
All schema constraints and annotations
{
  "description": "All CPU stats aggregated since container inception.\n",
  "properties": {
    "percpu_usage": {
      "description": "Total CPU time (in nanoseconds) consumed per core (Linux).\n\nThis field is Linux-specific when using cgroups v1. It is omitted\nwhen using cgroups v2 and Windows containers.\n",
      "items": {
        "example": 29912000,
        "format": "uint64",
        "type": "integer"
      },
      "type": "array",
      "x-nullable": true
    },
    "total_usage": {
      "description": "Total CPU time consumed in nanoseconds (Linux) or 100's of nanoseconds (Windows).\n",
      "example": 29912000,
      "format": "uint64",
      "type": "integer"
    },
    "usage_in_kernelmode": {
      "description": "Time (in nanoseconds) spent by tasks of the cgroup in kernel mode (Linux),\nor time spent (in 100's of nanoseconds) by all container processes in\nkernel mode (Windows).\n\nNot populated for Windows containers using Hyper-V isolation.\n",
      "example": 21994000,
      "format": "uint64",
      "type": "integer"
    },
    "usage_in_usermode": {
      "description": "Time (in nanoseconds) spent by tasks of the cgroup in user mode (Linux),\nor time spent (in 100's of nanoseconds) by all container processes in\nkernel mode (Windows).\n\nNot populated for Windows containers using Hyper-V isolation.\n",
      "example": 7918000,
      "format": "uint64",
      "type": "integer"
    }
  },
  "type": "object",
  "x-go-name": "CPUUsage",
  "x-nullable": true
}