Search or ask Docker

ContainerMemoryStats

ContainerMemoryStats schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

Aggregates all memory stats since container inception on Linux. Windows returns stats for commit and private working set only.
commitbytes

Type: integer

Committed bytes.

This field is Windows-specific and omitted for Linux containers.

All schema constraints and annotations
{
  "description": "Committed bytes.\n\nThis field is Windows-specific and omitted for Linux containers.\n",
  "example": 0,
  "format": "uint64",
  "type": "integer",
  "x-nullable": true
}
commitpeakbytes

Type: integer

Peak committed bytes.

This field is Windows-specific and omitted for Linux containers.

All schema constraints and annotations
{
  "description": "Peak committed bytes.\n\nThis field is Windows-specific and omitted for Linux containers.\n",
  "example": 0,
  "format": "uint64",
  "type": "integer",
  "x-nullable": true
}
failcnt

Type: integer

Number of times memory usage hits limits.

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

All schema constraints and annotations
{
  "description": "Number of times memory usage hits limits.\n\nThis field is Linux-specific and only supported on cgroups v1.\nIt is omitted when using cgroups v2 and for Windows containers.\n",
  "example": 0,
  "format": "uint64",
  "type": "integer",
  "x-nullable": true
}
limit

Type: integer

This field is Linux-specific and omitted for Windows containers.
All schema constraints and annotations
{
  "description": "This field is Linux-specific and omitted for Windows containers.\n",
  "example": 8217579520,
  "format": "uint64",
  "type": "integer",
  "x-nullable": true
}
max_usage

Type: integer

Maximum usage ever recorded.

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

All schema constraints and annotations
{
  "description": "Maximum usage ever recorded.\n\nThis field is Linux-specific and only supported on cgroups v1.\nIt is omitted when using cgroups v2 and for Windows containers.\n",
  "example": 0,
  "format": "uint64",
  "type": "integer",
  "x-nullable": true
}
privateworkingset

Type: integer

Private working set.

This field is Windows-specific and omitted for Linux containers.

All schema constraints and annotations
{
  "description": "Private working set.\n\nThis field is Windows-specific and omitted for Linux containers.\n",
  "example": 0,
  "format": "uint64",
  "type": "integer",
  "x-nullable": true
}
stats

Type: object

All the stats exported via memory.stat.

The fields in this object differ between cgroups v1 and v2. On cgroups v1, fields such as cache, rss, mapped_file are available. On cgroups v2, fields such as file, anon, inactive_file are available.

This field is Linux-specific and omitted for Windows containers.

All schema constraints and annotations
{
  "additionalProperties": {
    "format": "uint64",
    "type": "integer",
    "x-nullable": true
  },
  "description": "All the stats exported via memory.stat.\n\nThe fields in this object differ between cgroups v1 and v2.\nOn cgroups v1, fields such as `cache`, `rss`, `mapped_file` are available.\nOn cgroups v2, fields such as `file`, `anon`, `inactive_file` are available.\n\nThis field is Linux-specific and omitted for Windows containers.\n",
  "example": {
    "active_anon": 1572864,
    "active_file": 5115904,
    "anon": 1572864,
    "anon_thp": 0,
    "file": 7626752,
    "file_dirty": 0,
    "file_mapped": 2723840,
    "file_writeback": 0,
    "inactive_anon": 0,
    "inactive_file": 2510848,
    "kernel_stack": 16384,
    "pgactivate": 0,
    "pgdeactivate": 0,
    "pgfault": 2042,
    "pglazyfree": 0,
    "pglazyfreed": 0,
    "pgmajfault": 45,
    "pgrefill": 0,
    "pgscan": 0,
    "pgsteal": 0,
    "shmem": 0,
    "slab": 1180928,
    "slab_reclaimable": 725576,
    "slab_unreclaimable": 455352,
    "sock": 0,
    "thp_collapse_alloc": 0,
    "thp_fault_alloc": 1,
    "unevictable": 0,
    "workingset_activate": 0,
    "workingset_nodereclaim": 0,
    "workingset_refault": 0
  },
  "type": "object"
}
usage

Type: integer

Current res_counter usage for memory.

This field is Linux-specific and omitted for Windows containers.

All schema constraints and annotations
{
  "description": "Current `res_counter` usage for memory.\n\nThis field is Linux-specific and omitted for Windows containers.\n",
  "example": 0,
  "format": "uint64",
  "type": "integer",
  "x-nullable": true
}
All schema constraints and annotations
{
  "description": "Aggregates all memory stats since container inception on Linux.\nWindows returns stats for commit and private working set only.\n",
  "properties": {
    "commitbytes": {
      "description": "Committed bytes.\n\nThis field is Windows-specific and omitted for Linux containers.\n",
      "example": 0,
      "format": "uint64",
      "type": "integer",
      "x-nullable": true
    },
    "commitpeakbytes": {
      "description": "Peak committed bytes.\n\nThis field is Windows-specific and omitted for Linux containers.\n",
      "example": 0,
      "format": "uint64",
      "type": "integer",
      "x-nullable": true
    },
    "failcnt": {
      "description": "Number of times memory usage hits limits.\n\nThis field is Linux-specific and only supported on cgroups v1.\nIt is omitted when using cgroups v2 and for Windows containers.\n",
      "example": 0,
      "format": "uint64",
      "type": "integer",
      "x-nullable": true
    },
    "limit": {
      "description": "This field is Linux-specific and omitted for Windows containers.\n",
      "example": 8217579520,
      "format": "uint64",
      "type": "integer",
      "x-nullable": true
    },
    "max_usage": {
      "description": "Maximum usage ever recorded.\n\nThis field is Linux-specific and only supported on cgroups v1.\nIt is omitted when using cgroups v2 and for Windows containers.\n",
      "example": 0,
      "format": "uint64",
      "type": "integer",
      "x-nullable": true
    },
    "privateworkingset": {
      "description": "Private working set.\n\nThis field is Windows-specific and omitted for Linux containers.\n",
      "example": 0,
      "format": "uint64",
      "type": "integer",
      "x-nullable": true
    },
    "stats": {
      "additionalProperties": {
        "format": "uint64",
        "type": "integer",
        "x-nullable": true
      },
      "description": "All the stats exported via memory.stat.\n\nThe fields in this object differ between cgroups v1 and v2.\nOn cgroups v1, fields such as `cache`, `rss`, `mapped_file` are available.\nOn cgroups v2, fields such as `file`, `anon`, `inactive_file` are available.\n\nThis field is Linux-specific and omitted for Windows containers.\n",
      "example": {
        "active_anon": 1572864,
        "active_file": 5115904,
        "anon": 1572864,
        "anon_thp": 0,
        "file": 7626752,
        "file_dirty": 0,
        "file_mapped": 2723840,
        "file_writeback": 0,
        "inactive_anon": 0,
        "inactive_file": 2510848,
        "kernel_stack": 16384,
        "pgactivate": 0,
        "pgdeactivate": 0,
        "pgfault": 2042,
        "pglazyfree": 0,
        "pglazyfreed": 0,
        "pgmajfault": 45,
        "pgrefill": 0,
        "pgscan": 0,
        "pgsteal": 0,
        "shmem": 0,
        "slab": 1180928,
        "slab_reclaimable": 725576,
        "slab_unreclaimable": 455352,
        "sock": 0,
        "thp_collapse_alloc": 0,
        "thp_fault_alloc": 1,
        "unevictable": 0,
        "workingset_activate": 0,
        "workingset_nodereclaim": 0,
        "workingset_refault": 0
      },
      "type": "object"
    },
    "usage": {
      "description": "Current `res_counter` usage for memory.\n\nThis field is Linux-specific and omitted for Windows containers.\n",
      "example": 0,
      "format": "uint64",
      "type": "integer",
      "x-nullable": true
    }
  },
  "type": "object",
  "x-go-name": "MemoryStats"
}