Forrest logo
back to the docker tool

docker:tldr:0d971

docker: Display a live stream for the statistics of all running containers.
$ docker stats
try on your machine

The docker stats command is used to display live CPU, memory, network I/O, and disk I/O usage statistics for running containers in your Docker environment. When you run this command, it continuously displays the CPU usage, memory and swap usage, network input/output, and disk input/output for each container.

The output of the docker stats command includes the following information for each container:

  • Container ID: Unique identifier for the container.
  • Name: Name of the container.
  • CPU %: Percentage of CPU usage by the container.
  • Mem Usage / Limit: Memory usage by the container compared to the allocated memory limit.
  • Mem %: Percentage of memory used by the container.
  • Net I/O: Network input/output in bytes.
  • Block I/O: Disk input/output in bytes.
  • PIDs: Number of processes running inside the container.

The docker stats command is useful for monitoring the resource usage of containers and identifying any potential bottlenecks or performance issues. By continuously displaying live statistics, it allows you to track the resource consumption of containers in real-time and make informed decisions for scaling or troubleshooting purposes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool