• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Understanding “docker stats” Command Output

by admin

Question: How to monitor a running docker container performance metrics. For example, CPU,memory, I/O and network stats?

The docker stats command can continuously report the basic CPU, memory, network and disk I/O metrics. For example:

# docker stats a3f78cb32a8e
CONTAINER ID   NAME              CPU %  MEM USAGE / LIMIT   MEM %   NET I/O BLOCK    I/O          PIDS
a3f78cb32a8e    hello-world    0.00%   2.137MiB / 3.605GiB  0.06%     0B / 0B        9.95MB / 0B   0

Alternatively, you can also run “docker stats” and “docker stats –all” to monitor all running container’s metrics.

In the command output, these are the following key metrics:

1. CPU stats

CPU is reported as % of total host capacity.

2. Memory stats

It is the percentage of the host’s CPU and memory the container is using. If the host is using memory for other processes, your container will run out of memory before it hits the limit reported by the stats command.

3. Block I/O stats

The amount of data the container has read to and written from block devices on the host.

4. Network I/O stats

The amount of data the container has sent and received over its network interface. Displays total bytes received (RX) and transmitted (TX).

5. PIDs

They are the number of processes or threads the container has created.

Filed Under: DevOps, Docker

Some more articles you might also be interested in …

  1. Kubernetes Command Line Reference (Cheatsheet)
  2. “docker network” Command Examples
  3. Bash if loop examples (if then fi, if then elif fi, if then else fi)
  4. Using Loops (while, for) in awk scripts
  5. How to Install awscli
  6. How to use “break” and “continue” statements in shell scripts
  7. How to use ansible-config to discover and investigate configuration options
  8. fly: Command-line tool for concourse-ci
  9. Docker Basics – Expose ports, port binding and docker link
  10. “docker build” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright