svn commit: r262229 - in stable: 10/usr.bin/nfsstat 8/usr.bin/nfsstat 9/usr.bin/nfsstat

John Baldwin jhb at FreeBSD.org
Wed Feb 19 19:28:51 UTC 2014


Author: jhb
Date: Wed Feb 19 19:28:49 2014
New Revision: 262229
URL: http://svnweb.freebsd.org/changeset/base/262229

Log:
  MFC 261512,261514:
  - Partially revert r52493 and change client side interval statistics to
    report the actual number of RPCs issued, not the theoretical number
    that would be issued if all caching was disabled.
  - Use the DELTA() macro to tidy the server-side interval stats code a bit.

Modified:
  stable/9/usr.bin/nfsstat/nfsstat.c
Directory Properties:
  stable/9/usr.bin/nfsstat/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/nfsstat/nfsstat.c
  stable/8/usr.bin/nfsstat/nfsstat.c
Directory Properties:
  stable/10/   (props changed)
  stable/8/usr.bin/nfsstat/   (props changed)

Modified: stable/9/usr.bin/nfsstat/nfsstat.c
==============================================================================
--- stable/9/usr.bin/nfsstat/nfsstat.c	Wed Feb 19 19:11:14 2014	(r262228)
+++ stable/9/usr.bin/nfsstat/nfsstat.c	Wed Feb 19 19:28:49 2014	(r262229)
@@ -604,14 +604,15 @@ sidewaysintpr(u_int interval, int client
 		if (clientOnly) {
 		    printf("%s %6d %6d %6d %6d %6d %6d %6d %6d",
 			((clientOnly && serverOnly) ? "Client:" : ""),
-			DELTA(attrcache_hits) + DELTA(attrcache_misses),
-			DELTA(lookupcache_hits) + DELTA(lookupcache_misses),
-			DELTA(biocache_readlinks),
-			DELTA(biocache_reads),
-			DELTA(biocache_writes),
-			nfsstats.rpccnt[NFSPROC_RENAME]-lastst.rpccnt[NFSPROC_RENAME],
-			DELTA(accesscache_hits) + DELTA(accesscache_misses),
-			DELTA(biocache_readdirs)
+			DELTA(rpccnt[NFSPROC_GETATTR]),
+			DELTA(rpccnt[NFSPROC_LOOKUP]),
+			DELTA(rpccnt[NFSPROC_READLINK]),
+			DELTA(rpccnt[NFSPROC_READ]),
+			DELTA(rpccnt[NFSPROC_WRITE]),
+			DELTA(rpccnt[NFSPROC_RENAME]),
+			DELTA(rpccnt[NFSPROC_ACCESS]),
+			DELTA(rpccnt[NFSPROC_READDIR]) +
+			DELTA(rpccnt[NFSPROC_READDIRPLUS])
 		    );
 		    if (widemode) {
 			    printf(" %s %s %s %s %s %s",
@@ -993,15 +994,15 @@ exp_sidewaysintpr(u_int interval, int cl
 		if (clientOnly) {
 		    printf("%s %6d %6d %6d %6d %6d %6d %6d %6d",
 			((clientOnly && serverOnly) ? "Client:" : ""),
-			DELTA(attrcache_hits) + DELTA(attrcache_misses),
-			DELTA(lookupcache_hits) + DELTA(lookupcache_misses),
-			DELTA(biocache_readlinks),
-			DELTA(biocache_reads),
-			DELTA(biocache_writes),
-			nfsstats.rpccnt[NFSPROC_RENAME] -
-			lastst.rpccnt[NFSPROC_RENAME],
-			DELTA(accesscache_hits) + DELTA(accesscache_misses),
-			DELTA(biocache_readdirs)
+			DELTA(rpccnt[NFSPROC_GETATTR]),
+			DELTA(rpccnt[NFSPROC_LOOKUP]),
+			DELTA(rpccnt[NFSPROC_READLINK]),
+			DELTA(rpccnt[NFSPROC_READ]),
+			DELTA(rpccnt[NFSPROC_WRITE]),
+			DELTA(rpccnt[NFSPROC_RENAME]),
+			DELTA(rpccnt[NFSPROC_ACCESS]),
+			DELTA(rpccnt[NFSPROC_READDIR]) +
+			DELTA(rpccnt[NFSPROC_READDIRPLUS])
 		    );
 		    if (widemode) {
 			    printf(" %s %s %s %s %s %s",
@@ -1025,24 +1026,15 @@ exp_sidewaysintpr(u_int interval, int cl
 		if (serverOnly) {
 		    printf("%s %6d %6d %6d %6d %6d %6d %6d %6d",
 			((clientOnly && serverOnly) ? "Server:" : ""),
-			nfsstats.srvrpccnt[NFSV4OP_GETATTR] -
-			lastst.srvrpccnt[NFSV4OP_GETATTR],
-			nfsstats.srvrpccnt[NFSV4OP_LOOKUP] -
-			lastst.srvrpccnt[NFSV4OP_LOOKUP],
-			nfsstats.srvrpccnt[NFSV4OP_READLINK] -
-			lastst.srvrpccnt[NFSV4OP_READLINK],
-			nfsstats.srvrpccnt[NFSV4OP_READ] -
-			lastst.srvrpccnt[NFSV4OP_READ],
-			nfsstats.srvrpccnt[NFSV4OP_WRITE] -
-			lastst.srvrpccnt[NFSV4OP_WRITE],
-			nfsstats.srvrpccnt[NFSV4OP_RENAME] -
-			lastst.srvrpccnt[NFSV4OP_RENAME],
-			nfsstats.srvrpccnt[NFSV4OP_ACCESS] -
-			lastst.srvrpccnt[NFSV4OP_ACCESS],
-			(nfsstats.srvrpccnt[NFSV4OP_READDIR] -
-			 lastst.srvrpccnt[NFSV4OP_READDIR]) +
-			(nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS] -
-			 lastst.srvrpccnt[NFSV4OP_READDIRPLUS]));
+			DELTA(srvrpccnt[NFSV4OP_GETATTR]),
+			DELTA(srvrpccnt[NFSV4OP_LOOKUP]),
+			DELTA(srvrpccnt[NFSV4OP_READLINK]),
+			DELTA(srvrpccnt[NFSV4OP_READ]),
+			DELTA(srvrpccnt[NFSV4OP_WRITE]),
+			DELTA(srvrpccnt[NFSV4OP_RENAME]),
+			DELTA(srvrpccnt[NFSV4OP_ACCESS]),
+			DELTA(srvrpccnt[NFSV4OP_READDIR]) +
+			DELTA(srvrpccnt[NFSV4OP_READDIRPLUS]));
 		    printf("\n");
 		    lastst = nfsstats;
 		}


More information about the svn-src-stable-9 mailing list