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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. How to Start, Stop and Restart Zimbra Service
  2. Beginners Guide to The Docker World
  3. 6 Bash Shell Command Line Chaining Operators in Linux
  4. How to configure docker to use proxy
  5. How to use shell expansions for generating shell tokens under Linux
  6. My Development Environment Set up on Windows to use Python for Web Dev & Data Science
  7. Python Quadratic Formula
  8. Beginners Guide to Using “trap” to Catch Signals and Handle Errors in Shell Script
  9. How to update/add a file in the Docker Image
  10. “Error: Could Not Find A Ready Tiller Pod” – helm error

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright