Use f_bavail instead of f_bfree#33
Merged
Merged
Conversation
chore: add CHANGELOG.md
Development: release 0.1.1
…-fix fix: gracefully handle disappearing procs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed a discrepancy between the output of
dfandGBfreein plotman. Did a bit of digging and it turns out that df usesf_bavail, which doesn't include the blocks allocated to root, 5% of the total by default [0]. Plotman usesf_bfreewhich includes all blocks. I'm no linux expert but it seems more accurate to report the writable blocks. In fact, some people recommend removing the reserved blocks to unlock extra space [1].This pr replaces the use of
f_bfreewithf_bavail. I'm not familiar enough with the whole codebase to know what kind of side effects this might have but I definitely prefer it for monitoring my plots.[0] https://www.linuxquestions.org/questions/aix-43/diff-between-f_bavail-and-f_bfree-in-statfs-sys-call-207272/
[1] keybase://chat/chia_network.public#farming-hardware/11861