aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2022-05-28 23:27:02 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2022-05-28 23:27:02 +0000
commitd92dc803f699c76873220e3fcb87940007be7d1b (patch)
tree94de45c5319d97a0058cc69d1eecc6a9f1960b0b
parent7cab630ba4fb26bf85336a89d88721ed2315c46c (diff)
downloadsrc-d92dc803f699c76873220e3fcb87940007be7d1b.tar.gz
src-d92dc803f699c76873220e3fcb87940007be7d1b.zip
nfsstat: Add an entry to output NFSPROC_APPENDWRITE count
Commit 5218d82c81f9 added a new NFSv4.1/4.2 procedure called AppendWrite that uses a Verify to avoid a separate Getattr RPC for the common case where the client knows the correct file size for O_APPEND writes. This patch modifies nfsstat so that it displays a count of these new RPCs for the "-E -c" option.
-rw-r--r--usr.bin/nfsstat/nfsstat.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c
index da075d57c52e..37bec0daa9ac 100644
--- a/usr.bin/nfsstat/nfsstat.c
+++ b/usr.bin/nfsstat/nfsstat.c
@@ -750,13 +750,16 @@ exp_intpr(int clientOnly, int serverOnly, int nfs41)
(uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMITDS]);
xo_emit("{T:OpenLayout/%13.13s}{T:CreateLayout/%13.13s}"
- "{T:BindConnSess/%13.13s}{T:LookupOpen/%13.13s}\n");
+ "{T:BindConnSess/%13.13s}{T:LookupOpen/%13.13s}"
+ "{T:AppendWrite/%13.13s}\n");
xo_emit("{:openlayout/%13ju}{:createlayout/%13ju}"
- "{:bindconnsess/%13ju}{:lookupopen/%13ju}\n",
- (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENLAYGET],
- (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATELAYGET],
- (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_BINDCONNTOSESS],
- (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUPOPEN]);
+ "{:bindconnsess/%13ju}{:lookupopen/%13ju}"
+ "{:appendwrite/%13ju}\n",
+ (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENLAYGET],
+ (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATELAYGET],
+ (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_BINDCONNTOSESS],
+ (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUPOPEN],
+ (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_APPENDWRITE]);
xo_close_container("nfsv41");