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

Small drives are shown in red even when there is plenty of space #136

Open
metov opened this issue Sep 10, 2021 · 5 comments
Open

Small drives are shown in red even when there is plenty of space #136

metov opened this issue Sep 10, 2021 · 5 comments

Comments

@metov
Copy link

metov commented Sep 10, 2021

When I create a 1 GB partition on my drive, and write 100 MB of data to it, duf highlights it in red. I assume this means low space and indicates that "only" 900 MB free space is left. However, a partition being 10% full hardly seems like something to be alarmed over.

I suppose it is ultimately subjective whether people would care more about absolute or relative free space. Sounds like duf is going with the latter. Is there any possibility of focusing on relative space instead?

  • In my use case, the partition in question is /boot and hence the 900 MB of free space is actually plenty.
  • Using relative thresholds is self-updating, and obviates the need to perpetually increase the threshold of what counts as "low" as hard drives get bigger and user expectations change.

If it is desirable to keep the current behavior of going by absolute sizes, maybe we could have an option --highlighting {relative|absolute}?

@Justinzobel
Copy link

This is an issue for me also as it shows boot and efi partitions in red even though there's plenty of space:
image

@muesli
Copy link
Owner

muesli commented Feb 1, 2022

This kind of works as intended. You'll still get to see a green value for the usage in percent. As I see it, unifying the color coding for both columns would only remove information. I do understand that everyone has different needs however, so maybe duf's recently added --avail-threshold and --usage-threshold flags help remedy this a bit?

# Availability threshold, for example in gigabytes
$ duf --avail-threshold="10G,1G"

# Usage-threshold in percent between 0.0 and 1.0
$ duf --usage-threshold="0.5,0.9"

@Justinzobel
Copy link

The problem with the thresholds is they are global I imagine, against all disks.

I don't want it to tell me when only 559.7M is available on my root partition, which could easily fill up in moments with caches and regular activities.

@metov
Copy link
Author

metov commented Feb 1, 2022

@muesli Thank you for the response! Those options resolve my issue, so feel free to close.

@C0rn3j
Copy link

C0rn3j commented Mar 3, 2024

@muesli allowing to use --avail-threshold and --usage-threshold repeatedly with some kind of optional identifiers would solve this issue, more detailed description on dysk repo: Canop/dysk#18 (comment)

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

No branches or pull requests

4 participants