• 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. “Error: Could Not Find A Ready Tiller Pod” – helm error
  2. How to use command redirection under Linux
  3. Python Quadratic Formula
  4. How To Get Information About a Container In Docker
  5. Unable to run NGINX Docker due to “13: Permission denied”
  6. Korn Shell select Loop
  7. Shell Script to print pyramid of Stars
  8. How to use shell expansions for generating shell tokens under Linux
  9. How To Access Kubernetes Dashboard Externally
  10. gradle: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright