5.7 NFS Statistics
The NFS client and server are instrumented so that they can be observed with iostat and nfsstat. For client-side mounts, iostat reports the latency for read and write operations per mount, and instead of reporting disk response times, iostat reports NFS server response times (including over-the-write latency). The -c and -s options of the nfsstat command reports both client- and server-side statistics for each NFS operation as specified in the NFS protocol.
5.7.1 NFS Client Statistics: nfsstat -c
The client-side statistics show the number of calls for RPC transport, virtual meta-data (also described as attributes), and read/write operations. The statistics are separated by NFS version number (currently 2, 3, and 4) and protocol options (TCP or UDP).
$ nfsstat -c Client rpc: Connection oriented: calls badcalls badxids timeouts newcreds badverfs timers 202499 0 0 0 0 0 0 cantconn nomem interrupts 0 0 0 Connectionless: calls badcalls retrans badxids timeouts newcreds badverfs 0 0 0 0 0 0 0 timers nomem cantsend 0 0 0 Client nfs: calls badcalls clgets cltoomany 200657 0 200657 7 Version 2: (0 calls) null getattr setattr root lookup readlink read wrcache 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% write create remove rename link symlink mkdir rmdir 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% readdir statfs 0 0% 0 0% Version 3: (0 calls) null getattr setattr lookup access readlink 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% read write create mkdir symlink mknod 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% remove rmdir rename link readdir readdirplus 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% fsstat fsinfo pathconf commit 0 0% 0 0% 0 0% 0 0%
5.7.2 NFS Server Statistics: nfsstat -s
The NFS server-side statistics show the NFS operations performed by the NFS server.
$ nfsstat -s Server rpc: Connection oriented: calls badcalls nullrecv badlen xdrcall dupchecks dupreqs 5897288 0 0 0 0 372803 0 Connectionless: calls badcalls nullrecv badlen xdrcall dupchecks dupreqs 87324 0 0 0 0 0 0 ... Version 4: (949163 calls) null compound 3175 0% 945988 99% Version 4: (3284515 operations) reserved access close commit 0 0% 72954 2% 199208 6% 2948 0% create delegpurge delegreturn getattr 4 0% 0 0% 16451 0% 734376 22% getfh link lock lockt 345041 10% 6 0% 101 0% 0 0% locku lookup lookupp nverify 101 0% 145651 4% 5715 0% 171515 5% open openattr open_confirm open_downgrade 199410 6% 0 0% 271 0% 0 0% putfh putpubfh putrootfh read 914825 27% 0 0% 581 0% 130451 3% readdir readlink remove rename 5661 0% 11905 0% 15 0% 201 0% renew restorefh savefh secinfo 30765 0% 140543 4% 146336 4% 277 0% setattr setclientid setclientid_confirm verify 23 0% 26 0% 26 0% 10 0% write release_lockowner illegal 9118 0% 0 0% 0 0% ...