Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reporting of purgeable space on MacOS #2907

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ledeuns
Copy link

@ledeuns ledeuns commented Jan 25, 2024

Purgeable space is space that macOS can free up when needed by removing files from your computer (you can't manually remove the files that are designated purgeable, but macOS removes them as space is required). So statfs can report low available space when in fact you can use more than that.

@discordianfish
Copy link
Member

Needs formatting (see test fail) and DCO sign-off

Denis and others added 2 commits January 30, 2024 17:06
Purgeable space is space that macOS can free up when needed by removing files from your computer (you can't manually remove the files that are designated purgeable, but macOS removes them as space is required).
So statfs can report low available space when in fact you can use more than that.

Signed-off-by: Denis <per43014@adobe.com>
Signed-off-by: Denis <per43014@adobe.com>
collector/filesystem_common.go Outdated Show resolved Hide resolved
collector/filesystem_common.go Outdated Show resolved Hide resolved
@ledeuns ledeuns closed this Feb 15, 2024
@SuperQ
Copy link
Member

SuperQ commented Feb 15, 2024

Why close? This is almost ready.

@ledeuns
Copy link
Author

ledeuns commented Feb 15, 2024

I cannot make my own diff work anymore 🤣
I need to rework it from scratch to understand where I messed up.

@ledeuns ledeuns reopened this Nov 18, 2024
Signed-off-by: Denis Fondras <1040974+ledeuns@users.noreply.github.com>
@ledeuns ledeuns marked this pull request as draft November 18, 2024 10:56
Signed-off-by: Denis Fondras <1040974+ledeuns@users.noreply.github.com>
@ledeuns ledeuns marked this pull request as ready for review November 18, 2024 11:22
@ledeuns
Copy link
Author

ledeuns commented Nov 18, 2024

Tested on MacOS 14 (x86+M2) and Ubuntu 22.04
Needs to be started as root to get purgeable space info (otherwise it returns 0)

@ledeuns ledeuns requested a review from SuperQ November 18, 2024 13:11
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.

3 participants