public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] mountstats: Don't display retrans stats unless there are re-xmits
Date: Tue, 04 Nov 2014 14:04:41 -0500	[thread overview]
Message-ID: <54592349.4030504@RedHat.com> (raw)
In-Reply-To: <20141031211917.13278.61844.stgit@manet.1015granger.net>



On 10/31/2014 05:19 PM, Chuck Lever wrote:
> Clean up display of RPC statistics by omitting retransmit statistics
> when there have been no retransmissions.
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Committed... 

steved.

> ---
>  tools/mountstats/mountstats.py |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
> index 1fb3e2f..9a6ec43 100644
> --- a/tools/mountstats/mountstats.py
> +++ b/tools/mountstats/mountstats.py
> @@ -272,8 +272,11 @@ class DeviceData:
>                  print('%s:' % op)
>                  print('\t%d ops (%d%%)' % \
>                      (count, ((count * 100) / sends)), end=' ')
> -                print('\t%d retrans (%d%%)' % (retrans, ((retrans * 100) / count)), end=' ')
> -                print('\t%d major timeouts' % stats[2])
> +                if retrans != 0:
> +                    print('\t%d retrans (%d%%)' % (retrans, ((retrans * 100) / count)), end=' ')
> +                    print('\t%d major timeouts' % stats[2])
> +                else:
> +                    print('')
>                  print('\tavg bytes sent per op: %d\tavg bytes received per op: %d' % \
>                      (stats[3] / count, stats[4] / count))
>                  print('\tbacklog wait: %f' % (float(stats[5]) / count), end=' ')
> 

      reply	other threads:[~2014-11-04 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 21:19 [PATCH] mountstats: Don't display retrans stats unless there are re-xmits Chuck Lever
2014-11-04 19:04 ` Steve Dickson [this message]

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=54592349.4030504@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox