• 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

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 use command line shell functions in Linux
  2. How to use ansible-config to discover and investigate configuration options
  3. How to add new host entry in /etc/hosts when a docker container is run
  4. Introduction to sed (Stream Editor) : Useful sed Command Examples
  5. How to Create a Public/Private Repository in Docker Hub and connect it remotely using command line
  6. How to Pause and Resume Docker Containers
  7. How to schedule master node running pod/service as worker node
  8. Examples of “shift” Command in Shell Scripts
  9. 2to3 – Automated Python 2 to 3 code conversion
  10. aws-shell: command not found

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