linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsiostat: restore output format
@ 2013-06-19 14:58 Weston Andros Adamson
  2013-07-01 16:03 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Weston Andros Adamson @ 2013-06-19 14:58 UTC (permalink / raw)
  To: SteveD; +Cc: linux-nfs, Weston Andros Adamson

recent changes to support python 3 changed the output of nfsiostat from:

read:             ops/s            kB/s           kB/op         retrans         avg RTT (ms)    avg exe (ms)
                 48.094         2889.133         60.072        0 (0.0%)         177.160         184.833
...

to:

read:
  ops/s		   kB/s		  kB/op		retrans		avg RTT (ms)	avg exe (ms)
		  0.000
	  0.000
	  0.000
       0 (0.0%)
	  0.000
	  0.000
...

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
---
 tools/nfs-iostat/nfs-iostat.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
index dfbef87..c035537 100644
--- a/tools/nfs-iostat/nfs-iostat.py
+++ b/tools/nfs-iostat/nfs-iostat.py
@@ -353,14 +353,14 @@ class DeviceData:
             exe_per_op = 0.0
 
         op += ':'
-        print('%s' % op.lower().ljust(15))
+        print('%s' % op.lower().ljust(15), end='')
         print('  ops/s\t\t   kB/s\t\t  kB/op\t\tretrans\t\tavg RTT (ms)\tavg exe (ms)')
 
-        print('\t\t%7.3f' % (ops / sample_time))
-        print('\t%7.3f' % (kilobytes / sample_time))
-        print('\t%7.3f' % kb_per_op)
-        print(' %7d (%3.1f%%)' % (retrans, retrans_percent))
-        print('\t%7.3f' % rtt_per_op)
+        print('\t\t%7.3f' % (ops / sample_time), end='')
+        print('\t%7.3f' % (kilobytes / sample_time), end='')
+        print('\t%7.3f' % kb_per_op, end='')
+        print(' %7d (%3.1f%%)' % (retrans, retrans_percent), end='')
+        print('\t%7.3f' % rtt_per_op, end='')
         print('\t%7.3f' % exe_per_op)
 
     def ops(self, sample_time):
@@ -392,7 +392,7 @@ class DeviceData:
         print()
 
         print('   op/s\t\trpc bklog')
-        print('%7.2f' % (sends / sample_time))
+        print('%7.2f' % (sends / sample_time), end='')
         print('\t%7.2f' % backlog)
 
         if which == 0:
-- 
1.7.12.4 (Apple Git-37)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsiostat: restore output format
  2013-06-19 14:58 [PATCH] nfsiostat: restore output format Weston Andros Adamson
@ 2013-07-01 16:03 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2013-07-01 16:03 UTC (permalink / raw)
  To: Weston Andros Adamson; +Cc: linux-nfs



On 19/06/13 10:58, Weston Andros Adamson wrote:
> recent changes to support python 3 changed the output of nfsiostat from:
> 
> read:             ops/s            kB/s           kB/op         retrans         avg RTT (ms)    avg exe (ms)
>                  48.094         2889.133         60.072        0 (0.0%)         177.160         184.833
> ...
> 
> to:
> 
> read:
>   ops/s		   kB/s		  kB/op		retrans		avg RTT (ms)	avg exe (ms)
> 		  0.000
> 	  0.000
> 	  0.000
>        0 (0.0%)
> 	  0.000
> 	  0.000
> ...
> 
> Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Committed! 

steved.

> ---
>  tools/nfs-iostat/nfs-iostat.py | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
> index dfbef87..c035537 100644
> --- a/tools/nfs-iostat/nfs-iostat.py
> +++ b/tools/nfs-iostat/nfs-iostat.py
> @@ -353,14 +353,14 @@ class DeviceData:
>              exe_per_op = 0.0
>  
>          op += ':'
> -        print('%s' % op.lower().ljust(15))
> +        print('%s' % op.lower().ljust(15), end='')
>          print('  ops/s\t\t   kB/s\t\t  kB/op\t\tretrans\t\tavg RTT (ms)\tavg exe (ms)')
>  
> -        print('\t\t%7.3f' % (ops / sample_time))
> -        print('\t%7.3f' % (kilobytes / sample_time))
> -        print('\t%7.3f' % kb_per_op)
> -        print(' %7d (%3.1f%%)' % (retrans, retrans_percent))
> -        print('\t%7.3f' % rtt_per_op)
> +        print('\t\t%7.3f' % (ops / sample_time), end='')
> +        print('\t%7.3f' % (kilobytes / sample_time), end='')
> +        print('\t%7.3f' % kb_per_op, end='')
> +        print(' %7d (%3.1f%%)' % (retrans, retrans_percent), end='')
> +        print('\t%7.3f' % rtt_per_op, end='')
>          print('\t%7.3f' % exe_per_op)
>  
>      def ops(self, sample_time):
> @@ -392,7 +392,7 @@ class DeviceData:
>          print()
>  
>          print('   op/s\t\trpc bklog')
> -        print('%7.2f' % (sends / sample_time))
> +        print('%7.2f' % (sends / sample_time), end='')
>          print('\t%7.2f' % backlog)
>  
>          if which == 0:
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-01 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 14:58 [PATCH] nfsiostat: restore output format Weston Andros Adamson
2013-07-01 16:03 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).