Docker Stats and Inspect

Observe CPU, memory, and low-level container metadata.

  • docker stats
  • docker inspect
  • docker top
  • OOM killed
  • container metrics

Docker Stats and Inspect

Observe CPU, memory, and low-level container metadata.

Commands

CommandWhat it does
docker statsLive CPU/mem per container
docker stats --no-streamOne-shot snapshot
docker inspect <c>Full JSON: mounts, network, config
docker top <c>Processes running inside
docker port <c>Show published port mappings

Example

docker stats --no-stream
docker inspect api | grep -A3 Mounts
docker top api

FAQ

Container OOM-killed — how to confirm?

docker inspect shows OOMKilled: true; raise --memory or fix the leak, then set a limit so one container cannot take the host.

stats vs top?

stats = resource usage from the host view; top = process list from inside the container.

Întrebări frecvente

Container OOM-killed — how to confirm?
docker inspect shows OOMKilled: true; raise --memory or fix the leak, then set a limit so one container cannot take the host.
stats vs top?
stats = resource usage from the host view; top = process list from inside the container.

Docker