All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: print procentage of used space
Date: Tue, 3 Sep 2019 10:23:23 +0200	[thread overview]
Message-ID: <20190903082322.GA3298@redhat.com> (raw)
In-Reply-To: <20190902183919.GZ2752@twin.jikos.cz>

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

  reply	other threads:[~2019-09-03  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29  9:14 [PATCH] btrfs-progs: print procentage of used space Stanislaw Gruszka
2019-09-02 18:39 ` David Sterba
2019-09-03  8:23   ` Stanislaw Gruszka [this message]
2019-11-19 18:05     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190903082322.GA3298@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.