nfsstat: fix server rpc stats header
Subsystems (2)
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.
Signed-off-by Marko Myllynen <[email protected]>
--- utils/nfsstat/nfsstat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
utils/nfsstat/nfsstat.c +1 -1
@@ -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
Looks good,
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 28 lines · Marko Myllynen
linux/net/sunrpc/stats.chas:/*
* Get RPC server stats
*/
voidsvc_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/nfsdcontainsrpc 1 2 3 4 5
nfsstat -sv prints:
Server rpc stats:
calls badcalls badclnt badauth xdrcall 1 2 3 4 5Change this to match the kernel:
Quoted 7 lines
Server rpc stats:
calls badcalls badfmt badauth badclnt 1 2 3 4 5Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1142842.
Signed-off-by Marko Myllynen <[email protected]>
Committed....
steved.
Quoted 18 lines
--- utils/nfsstat/nfsstat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)utils/nfsstat/nfsstat.c +1
-1@@ -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" ); }