Skip to content

Add filesystem stats in ContainerStatistics - #930

Open
JaewonHur wants to merge 2 commits into
apple:mainfrom
JaewonHur:add-filesystem-stats
Open

JaewonHur wants to merge 2 commits into
apple:mainfrom
JaewonHur:add-filesystem-stats

Conversation

@JaewonHur

@JaewonHur JaewonHur commented Sep 16, 2026

Copy link
Copy Markdown
Contributor
  • Add filesystem (usedBytes, inodesUsed) field to protobuf ContainerStats
  • Add ManagedContainer.filesystemStats which stats the file system using statfs syscall. vminitd in guest uses this to get the measurement on containerStatistics calls
  • Update ContainerStatistics to include filesystem fields.
  • Added CZ_statfs in LCShim/syscall.c instead of using musl or glibc because it fails to import statfs when compiling for x86_64 linux.

* Add `filesystem (usedBytes, inodesUsed)` field to protobuf
  `ContainerStats`
* Add `ManagedContainer.filesystemStats` which stats the file system
  using `statfs` syscall. `vminitd` in guest uses this to get the
  measurement on `containerStatistics` calls
* Update `ContainerStatistics` to include `filesystem` fields.
`statfs` isn't reliably importable from Swift via the Musl/Glibc system
modulemap across architectures.
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.

1 participant