python-btrfs icon indicating copy to clipboard operation
python-btrfs copied to clipboard

Add some percentages to btrfs-usage-report output

Open knorrie opened this issue 4 years ago • 0 comments

When having a quick look, it would be pretty convenient if there were some percentages added, for example here:

Total physical space usage:
|
| Total filesystem size: 15.00TiB
| Allocated bytes: 14.93TiB
| Allocatable bytes remaining: 67.97GiB (x.y%)

...and probably in a few other places as well.

Note that in the above example, the percentage should be calculated, not based on total filesystem size (sum of size of all attached block devices), but based on actual allocatable raw disk space, which can be less in case there's 'soft' or 'hard' unallocatable disk space that cannot be used. So, that's similar to how e.g. the nagios monitoring plugin calculates stuff.

knorrie avatar Aug 18 '21 12:08 knorrie