• 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

How to check the status and space used by images and containers

By admin

This post objective is to find out the stats of running container, system information related to space used by images and containers on /var/lib/docker.

1. ‘docker stats‘ command used to check the containers stats on system like CPU usage, IO usage, Memory usage. Below example is for 2 running containers dockerweb and webserver2.

# docker stats dockerweb webserver2
CONTAINER ID   NAME       CPU   % MEM USAGE / LIMIT   MEM %    NET I/O      BLOCK I/O       PIDS
e33f00e0e3ce dockerweb   0.00%  7.934MiB / 975.9MiB  0.81%   2.64kB / 0B  14.5MB / 0B        9
ab9e9c22b93c webserver2  0.00%  6.98MiB / 975.9MiB   0.72%   1.87kB / 0B  13.1MB / 0B        6

2. ‘docker system df‘ command is used to check number of docker images and containers on system with space usage.

# docker system df
TYPE         TOTAL ACTIVE    SIZE    RECLAIMABLE
Images         6     4     1.415GB   237.3MB (16%)
Containers     9     1     407.2MB   407.2MB (99%)
Local Volumes  0     0       0B          0B
Build Cache    0     0       0B          0B

Filed Under: DevOps, Docker

Some more articles you might also be interested in …

  1. How to Configure Nagios NRPE Client for System Monitoring (CentOS/RHEL)
  2. How to Use user-defined Functions in awk
  3. How To Get Information About a Container In Docker
  4. New User Failed Run Kubectl with Error “The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port?”
  5. ‘docker images’ command error – “Permission Denied”
  6. How to install Docker on Mac
  7. Examples of creating command alias in different shells
  8. Korn Shell select Loop
  9. How to change the default IP address of docker bridge
  10. How to install docker on CentOS / RHEL / Fedora

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary