Skip to contentSkip to conversation

nfsstat: fix server rpc stats header

PATCH In review Marko Myllynen 3 participants 3 messages Oct 20, 2014 – Oct 22, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsstat: fix server rpc stats header

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.

---
 utils/nfsstat/nfsstat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
utils/nfsstat/nfsstat.c +1 -1
index 18e4d27..9f481db 100644
@@ -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");
 		}
Signature · 4 lines
1.7.1

-- 
Marko Myllynen
#2 lore raw
In reply to Marko Myllynen
Quoted 28 lines · Marko Myllynen

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:

Quoted 7 lines

Server rpc stats:

calls      badcalls   badfmt     badauth    badclnt
1          2          3          4          5

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

Committed....

steved.

Quoted 18 lines
---
 utils/nfsstat/nfsstat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
utils/nfsstat/nfsstat.c +1 -1
index 18e4d27..9f481db 100644
@@ -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");
 		}