Implement container stats by dcantah · Pull Request #851 · apple/container

@dcantah

This implements statistics gathering across the various components, but
ultimately this is for implementing a new CLI command: `container stats`.
This shows memory usage, cpu usage, network and block i/o and the number
of processes in the container. The new command can inspect stats for 1-N
containers and by default continuously updates in a `top` like stream.

jglogan

This was referenced

Nov 22, 2025

saehejkang pushed a commit to saehejkang/container that referenced this pull request

Jan 27, 2026
Closes apple#824

This implements statistics gathering across the various components, but
ultimately this is for implementing a new CLI command: `container
stats`. This shows memory usage, cpu usage, network and block i/o and
the number of processes in the container. The new command can inspect
stats for 1-N containers and by default continuously updates in a `top`
like stream.

## Type of Change
- [ ] Bug fix
- [x] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Testing
- [x] Tested locally
- [x] Added/updated tests
- [x] Added/updated docs