diff options
author | jhb <jhb@FreeBSD.org> | 2014-02-05 14:44:59 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-02-05 14:44:59 +0000 |
commit | f39931d6d5acc3a76f3f495c2d149cce13efce2f (patch) | |
tree | bfe0c7c2660874bbe64db4677cc5218be4dbbbe9 /usr.bin/nfsstat | |
parent | c9c7c29042edbacac0655e50d2cb5bce2dfcf868 (diff) | |
download | FreeBSD-src-f39931d6d5acc3a76f3f495c2d149cce13efce2f.zip FreeBSD-src-f39931d6d5acc3a76f3f495c2d149cce13efce2f.tar.gz |
Use the DELTA() macro to tidy the server-side interval stats code a bit.
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/nfsstat')
-rw-r--r-- | usr.bin/nfsstat/nfsstat.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 0b018ed..a5537f7 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -1025,24 +1025,15 @@ exp_sidewaysintpr(u_int interval, int clientOnly, int serverOnly) 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; |