Search or ask Docker

ContainerStatsResponse

ContainerStatsResponse schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

Statistics sample for a container.
blkio_stats

Schema: ContainerBlkioStats

cpu_stats

Schema: ContainerCPUStats

id

Type: string

ID of the container for which the stats were collected.
All schema constraints and annotations
{
  "description": "ID of the container for which the stats were collected.\n",
  "example": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
  "type": "string",
  "x-nullable": true
}
memory_stats

Schema: ContainerMemoryStats

name

Type: string

Name of the container for which the stats were collected.
All schema constraints and annotations
{
  "description": "Name of the container for which the stats were collected.\n",
  "example": "boring_wozniak",
  "type": "string",
  "x-nullable": true
}
networks

Network statistics for the container per interface.

This field is omitted if the container has no networking enabled.

All schema constraints and annotations
{
  "additionalProperties": {
    "$ref": "#/components/schemas/ContainerNetworkStats"
  },
  "description": "Network statistics for the container per interface.\n\nThis field is omitted if the container has no networking enabled.\n",
  "example": {
    "eth0": {
      "rx_bytes": 5338,
      "rx_dropped": 0,
      "rx_errors": 0,
      "rx_packets": 36,
      "tx_bytes": 648,
      "tx_dropped": 0,
      "tx_errors": 0,
      "tx_packets": 8
    },
    "eth5": {
      "rx_bytes": 4641,
      "rx_dropped": 0,
      "rx_errors": 0,
      "rx_packets": 26,
      "tx_bytes": 690,
      "tx_dropped": 0,
      "tx_errors": 0,
      "tx_packets": 9
    }
  },
  "x-nullable": true
}
num_procs

Type: integer

The number of processors on the system.

This field is Windows-specific and always zero for Linux containers.

All schema constraints and annotations
{
  "description": "The number of processors on the system.\n\nThis field is Windows-specific and always zero for Linux containers.\n",
  "example": 16,
  "format": "uint32",
  "type": "integer"
}
os_type

Type: string

OSType is the OS of the container ("linux" or "windows") to allow platform-specific handling of stats.
All schema constraints and annotations
{
  "description": "OSType is the OS of the container (\"linux\" or \"windows\") to allow\nplatform-specific handling of stats.\n",
  "example": "linux",
  "type": "string",
  "x-nullable": true
}
pids_stats

Schema: ContainerPidsStats

precpu_stats

Schema: ContainerCPUStats

preread

Type: string

Date and time at which this first sample was collected. This field is not propagated if the "one-shot" option is set. If the "one-shot" option is set, this field may be omitted, empty, or set to a default date (0001-01-01T00:00:00Z).

The value is formatted as RFC 3339 with nano-seconds.

All schema constraints and annotations
{
  "description": "Date and time at which this first sample was collected. This field\nis not propagated if the \"one-shot\" option is set. If the \"one-shot\"\noption is set, this field may be omitted, empty, or set to a default\ndate (`0001-01-01T00:00:00Z`).\n\nThe value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)\nwith nano-seconds.\n",
  "example": "2025-01-16T13:55:21.160452595Z",
  "format": "date-time",
  "type": "string"
}
read

Type: string

Date and time at which this sample was collected. The value is formatted as RFC 3339 with nano-seconds.
All schema constraints and annotations
{
  "description": "Date and time at which this sample was collected.\nThe value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)\nwith nano-seconds.\n",
  "example": "2025-01-16T13:55:22.165243637Z",
  "format": "date-time",
  "type": "string"
}
storage_stats

Schema: ContainerStorageStats

All schema constraints and annotations
{
  "description": "Statistics sample for a container.\n",
  "properties": {
    "blkio_stats": {
      "$ref": "#/components/schemas/ContainerBlkioStats"
    },
    "cpu_stats": {
      "$ref": "#/components/schemas/ContainerCPUStats"
    },
    "id": {
      "description": "ID of the container for which the stats were collected.\n",
      "example": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743",
      "type": "string",
      "x-nullable": true
    },
    "memory_stats": {
      "$ref": "#/components/schemas/ContainerMemoryStats"
    },
    "name": {
      "description": "Name of the container for which the stats were collected.\n",
      "example": "boring_wozniak",
      "type": "string",
      "x-nullable": true
    },
    "networks": {
      "additionalProperties": {
        "$ref": "#/components/schemas/ContainerNetworkStats"
      },
      "description": "Network statistics for the container per interface.\n\nThis field is omitted if the container has no networking enabled.\n",
      "example": {
        "eth0": {
          "rx_bytes": 5338,
          "rx_dropped": 0,
          "rx_errors": 0,
          "rx_packets": 36,
          "tx_bytes": 648,
          "tx_dropped": 0,
          "tx_errors": 0,
          "tx_packets": 8
        },
        "eth5": {
          "rx_bytes": 4641,
          "rx_dropped": 0,
          "rx_errors": 0,
          "rx_packets": 26,
          "tx_bytes": 690,
          "tx_dropped": 0,
          "tx_errors": 0,
          "tx_packets": 9
        }
      },
      "x-nullable": true
    },
    "num_procs": {
      "description": "The number of processors on the system.\n\nThis field is Windows-specific and always zero for Linux containers.\n",
      "example": 16,
      "format": "uint32",
      "type": "integer"
    },
    "os_type": {
      "description": "OSType is the OS of the container (\"linux\" or \"windows\") to allow\nplatform-specific handling of stats.\n",
      "example": "linux",
      "type": "string",
      "x-nullable": true
    },
    "pids_stats": {
      "$ref": "#/components/schemas/ContainerPidsStats"
    },
    "precpu_stats": {
      "$ref": "#/components/schemas/ContainerCPUStats"
    },
    "preread": {
      "description": "Date and time at which this first sample was collected. This field\nis not propagated if the \"one-shot\" option is set. If the \"one-shot\"\noption is set, this field may be omitted, empty, or set to a default\ndate (`0001-01-01T00:00:00Z`).\n\nThe value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)\nwith nano-seconds.\n",
      "example": "2025-01-16T13:55:21.160452595Z",
      "format": "date-time",
      "type": "string"
    },
    "read": {
      "description": "Date and time at which this sample was collected.\nThe value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)\nwith nano-seconds.\n",
      "example": "2025-01-16T13:55:22.165243637Z",
      "format": "date-time",
      "type": "string"
    },
    "storage_stats": {
      "$ref": "#/components/schemas/ContainerStorageStats"
    }
  },
  "title": "ContainerStatsResponse",
  "type": "object",
  "x-go-name": "StatsResponse"
}