v1

latestSwagger 2.02026-07-175684145.0 KB
Container

Get container stats based on resource usage

This endpoint returns a live stream of a container’s resource usage statistics.

The precpu_stats is the CPU statistic of the previous read, and is used to calculate the CPU usage percentage. It is not an exact copy of the cpu_stats field.

If either precpu_stats.online_cpus or cpu_stats.online_cpus is nil then for compatibility with older daemons the length of the corresponding cpu_usage.percpu_usage array should be used.

get/containers/{id}/stats

Path parameters

idstring required

ID or name of the container

Query parameters

streamboolean

Stream the output. If false, the stats will be output once and then it will disconnect.

Response

container stats

readstring date-time

read time of container stats.

idstring

container id

namestring

container name

networksobject