]> git.decadent.org.uk Git - nfs-utils.git/commit - utils/nfsstat/nfsstat.man
nfs-utils: nfsstat: has_stats() does not function correctly for NFSv4 client stats
authorHarshula Jayasuriya <harshula@redhat.com>
Mon, 22 Nov 2010 16:22:31 +0000 (11:22 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 22 Nov 2010 16:40:38 +0000 (11:40 -0500)
commit86f7be64cafd17d4a3f164603484eaedb4757431
treea82591b101199d42375f6dd9e07ada92c21888f8
parent0868dcccb9a3bf3d022a32ff31311fe371484e77
nfs-utils: nfsstat: has_stats() does not function correctly for NFSv4 client stats

The NFSv4 client procs/ops in "struct rpc_procinfo nfs4_procedures" is
used to generate the NFS client stats interface:
------------------------------------------------------------
net 0 0 0 0
rpc 15 0 0
proc2 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
proc3 22 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0
proc4 42 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0
0 0 0 0 0 0 0
------------------------------------------------------------
Note, for proc4, the number 42. That is the number of stats that follow
on the same line. Currently nfsstat's has_stats() relies on this number
to be equal to CLTPROC4_SZ. Unfortunately this is not the case. I have
changed has_stats() not to rely on these two values being equal. This
should also allow nfsstat to work with different kernel versions that
expose a different number of NFS client ops.

* Fix has_stats()
* Stop print_clnt_list() printing server stats!
* Describe the option -3 and -4 completely in the nfsstat manpage.

Signed-off-by: Harshula Jayasuriya <harshula@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/nfsstat/nfsstat.c
utils/nfsstat/nfsstat.man