Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 2014 19:28:50 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r262229 - in stable: 10/usr.bin/nfsstat 8/usr.bin/nfsstat 9/usr.bin/nfsstat
Message-ID:  <201402191928.s1JJSov4025550@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402191928.s1JJSov4025550>