public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsstat: fix server rpc stats header
@ 2014-10-20  5:12 Marko Myllynen
  2014-10-21 10:35 ` Christoph Hellwig
  2014-10-22 15:33 ` Steve Dickson
  0 siblings, 2 replies; 3+ messages in thread
From: Marko Myllynen @ 2014-10-20  5:12 UTC (permalink / raw)
  To: linux-nfs

linux/net/sunrpc/stats.c has:

/*
 * Get RPC server stats
 */
void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp) {
...
        seq_printf(seq,
                "rpc %u %u %u %u %u\n",
                        statp->rpccnt,
                        statp->rpcbadfmt+statp->rpcbadauth+statp->rpcbadclnt,
                        statp->rpcbadfmt,
                        statp->rpcbadauth,
                        statp->rpcbadclnt);
...

But when /proc/net/rpc/nfsd contains

rpc 1 2 3 4 5

nfsstat -sv prints:

Server rpc stats:
calls      badcalls   badclnt    badauth    xdrcall
1          2          3          4          5

Change this to match the kernel:

Server rpc stats:
calls      badcalls   badfmt     badauth    badclnt
1          2          3          4          5

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1142842.

Signed-off-by: Marko Myllynen <myllynen@redhat.com>
---
 utils/nfsstat/nfsstat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c
index 18e4d27..9f481db 100644
--- a/utils/nfsstat/nfsstat.c
+++ b/utils/nfsstat/nfsstat.c
@@ -558,7 +558,7 @@ print_server_stats(int opt_prt)
 			;
 		} else {
 			print_numbers(LABEL_srvrpc
-				"calls      badcalls   badclnt    badauth    xdrcall\n",
+				"calls      badcalls   badfmt     badauth    badclnt\n",
 				srvrpcinfo, 5);
 			printf("\n");
 		}
-- 
1.7.1

-- 
Marko Myllynen

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

* Re: [PATCH] nfsstat: fix server rpc stats header
  2014-10-20  5:12 [PATCH] nfsstat: fix server rpc stats header Marko Myllynen
@ 2014-10-21 10:35 ` Christoph Hellwig
  2014-10-22 15:33 ` Steve Dickson
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2014-10-21 10:35 UTC (permalink / raw)
  To: Marko Myllynen; +Cc: linux-nfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH] nfsstat: fix server rpc stats header
  2014-10-20  5:12 [PATCH] nfsstat: fix server rpc stats header Marko Myllynen
  2014-10-21 10:35 ` Christoph Hellwig
@ 2014-10-22 15:33 ` Steve Dickson
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2014-10-22 15:33 UTC (permalink / raw)
  To: myllynen, linux-nfs



On 10/20/2014 01:12 AM, Marko Myllynen wrote:
> linux/net/sunrpc/stats.c has:
> 
> /*
>  * Get RPC server stats
>  */
> void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp) {
> ...
>         seq_printf(seq,
>                 "rpc %u %u %u %u %u\n",
>                         statp->rpccnt,
>                         statp->rpcbadfmt+statp->rpcbadauth+statp->rpcbadclnt,
>                         statp->rpcbadfmt,
>                         statp->rpcbadauth,
>                         statp->rpcbadclnt);
> ...
> 
> But when /proc/net/rpc/nfsd contains
> 
> rpc 1 2 3 4 5
> 
> nfsstat -sv prints:
> 
> Server rpc stats:
> calls      badcalls   badclnt    badauth    xdrcall
> 1          2          3          4          5
> 
> Change this to match the kernel:
> 
> Server rpc stats:
> calls      badcalls   badfmt     badauth    badclnt
> 1          2          3          4          5
> 
> Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1142842.
> 
> Signed-off-by: Marko Myllynen <myllynen@redhat.com>
Committed.... 

steved.

> ---
>  utils/nfsstat/nfsstat.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c
> index 18e4d27..9f481db 100644
> --- a/utils/nfsstat/nfsstat.c
> +++ b/utils/nfsstat/nfsstat.c
> @@ -558,7 +558,7 @@ print_server_stats(int opt_prt)
>  			;
>  		} else {
>  			print_numbers(LABEL_srvrpc
> -				"calls      badcalls   badclnt    badauth    xdrcall\n",
> +				"calls      badcalls   badfmt     badauth    badclnt\n",
>  				srvrpcinfo, 5);
>  			printf("\n");
>  		}
> 

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

end of thread, other threads:[~2014-10-22 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20  5:12 [PATCH] nfsstat: fix server rpc stats header Marko Myllynen
2014-10-21 10:35 ` Christoph Hellwig
2014-10-22 15:33 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox