From owner-svn-src-all@FreeBSD.ORG Wed Feb 19 19:28:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 183D61E5; Wed, 19 Feb 2014 19:28:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 024791A32; Wed, 19 Feb 2014 19:28:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1JJSon7025551; Wed, 19 Feb 2014 19:28:50 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1JJSov4025550; Wed, 19 Feb 2014 19:28:50 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201402191928.s1JJSov4025550@svn.freebsd.org> From: John Baldwin Date: Wed, 19 Feb 2014 19:28:50 +0000 (UTC) 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 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2014 19:28:51 -0000 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; }