summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2006-03-20 13:44:22 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:22 -0500
commit4ece3a2d18fd7fe1d4972284a8c98c569020093f (patch)
treebc71e99d3e4fcc7fc34fea911981f2692377f5b5
parent11c556b3d8d481829ab5f9933a25d29b00913b5a (diff)
downloadop-kernel-dev-4ece3a2d18fd7fe1d4972284a8c98c569020093f.zip
op-kernel-dev-4ece3a2d18fd7fe1d4972284a8c98c569020093f.tar.gz
NFS: add RPC I/O statistics to /proc/self/mountstats
NFS client now shows various RPC I/O metrics in /proc/self/mountstats. Test plan: Mount/umount while doing "cat /proc/self/mountstats", multiple iterations of connectathon locking suite. Test with NFS version 2, 3, and 4. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 1b2d782..b9f35ca 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -26,6 +26,7 @@
#include <linux/unistd.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/stats.h>
+#include <linux/sunrpc/metrics.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/nfs4_mount.h>
@@ -728,6 +729,9 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
seq_printf(m, "\n\tbytes:\t");
for (i = 0; i < __NFSIOS_BYTESMAX; i++)
seq_printf(m, "%Lu ", totals.bytes[i]);
+ seq_printf(m, "\n");
+
+ rpc_print_iostats(m, nfss->client);
return 0;
}
OpenPOWER on IntegriCloud