Re: [PATCH] btrfs-progs: print procentage of used space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 02, 2019 at 08:39:19PM +0200, David Sterba wrote:
> On Thu, Aug 29, 2019 at 11:14:05AM +0200, Stanislaw Gruszka wrote:
> > This patch adds -p option for 'fi df' and 'fi show' commands to print
> > procentate of used space. Output with the option will look like on
> > example below:
> > 
> > Data, single: total=43.99GiB, used=37.25GiB (84.7%)
> > System, single: total=4.00MiB, used=12.00KiB (0.3%)
> > Metadata, single: total=1.01GiB, used=511.23MiB (49.5%)
> > GlobalReserve, single: total=92.50MiB, used=0.00B (0.0%)
> > 
> > I considered to change the prints by default without extra option,
> > but not sure if that would not break existing scripts that could parse
> > the output.
> 
> Would it be sufficient for your usecase to print the % values in the
> 'btrfs fi usage' command?
>
> After the summary, the's listing of the chunks with the same values and
> slightly different format:
> 
>   Data,single: Size:296.00GiB, Used:166.99GiB
> 
>   Metadata,single: Size:5.00GiB, Used:2.74GiB
> 
>   System,single: Size:32.00MiB, Used:48.00KiB
> 
> 
> For reference, this is from 'fi df':
> 
>   Data, single: total=296.00GiB, used=166.99GiB
>   System, single: total=32.00MiB, used=48.00KiB
>   Metadata, single: total=5.00GiB, used=2.74GiB
>   GlobalReserve, single: total=368.48MiB, used=0.00B
> 
> I'd rather not extend the output of 'fi df' as this was supposed to be a
> debugging tool and 'fi usage' is gives better and more complete
> overview, so the % seem more logical to be put there.

It would be sufficient for me to print percentage in 'fi usage' command.
I assume without extra -p option, just change the default output ?

What you think about adding percentage option to 'fi show'? It's not
super needed, but I somehow got use to have that information from
standard df tool.

Stanislaw



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux