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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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 Build and push Docker Image to the Docker Hub Repository
  2. How to List / Start / Stop / Delete docker Containers
  3. How to change the default IP address of docker bridge
  4. How to schedule master node running pod/service as a worker node
  5. How to Make a Variable read-only (constant) in Bash and Korn Shell
  6. “while” Loop Examples in Shell Scripts
  7. How to Configure Network Namespaces in Docker Containers
  8. ‘docker images’ command error – “Permission Denied”
  9. How to create Docker Image from a Container and Dockerfile
  10. How to Create a Public/Private Repository in Docker Hub and connect it remotely using command line

You May Also Like

Primary Sidebar

Recent Posts

  • Oracle Database – Configuring Secure Application Roles
  • Extend rule sets by using factors in Oracle Database Vault
  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary