Skip to content

Conversation

@realrajaryan
Copy link
Contributor

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

This PR implements the container system df command to display disk usage statistics for images, containers, and volumes, along with their total count, active count, size, and reclaimable space for each resource type.

Active resources are determined by container mount references and running state, while reclaimable space is calculated from inactive or stopped resources.

Example output:

~/container ❯ container system df
TYPE           TOTAL  ACTIVE  SIZE      RECLAIMABLE
Images         4      3       4.42 GB   516.5 MB (11%)
Containers     4      2       2.69 GB   1.51 GB (56%)
Local Volumes  3      2       208.5 MB  66.2 MB (32%)

I'll have some follow-on PRs that will add -v/--verbose flag for detailed per-resource information, --filter flag for filtering output by resource type, and a --debug flag for debug statistics like block usage, clone counts etc.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Copy link
Member

@dcantah dcantah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@realrajaryan realrajaryan force-pushed the users/realrajaryan/container-system-df branch from 258f3c7 to f3dbd64 Compare November 20, 2025 01:37
@realrajaryan realrajaryan force-pushed the users/realrajaryan/container-system-df branch from f3dbd64 to cd4cd7d Compare November 20, 2025 04:06
@realrajaryan realrajaryan requested a review from dcantah November 20, 2025 04:13
@tico88612 tico88612 mentioned this pull request Nov 20, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: Storage - Add container system df command to show storage usage for images, containers, and volumes

2 participants