* [PATCH] mountstats: Don't display retrans stats unless there are re-xmits
@ 2014-10-31 21:19 Chuck Lever
2014-11-04 19:04 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Lever @ 2014-10-31 21:19 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
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>
---
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=' ')
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mountstats: Don't display retrans stats unless there are re-xmits
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
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2014-11-04 19:04 UTC (permalink / raw)
To: Chuck Lever; +Cc: linux-nfs
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=' ')
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-04 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox