Linux NFS development
 help / color / mirror / Atom feed
From: Karim Manaouil <kmanaouil.dev@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: steved@redhat.com
Subject: [PATCH] nfsiostat: display READ_PLUS statistics when available
Date: Tue, 29 Sep 2026 02:22:58 +0100	[thread overview]
Message-ID: <20260929012258.7objh6we7hdzqlzv@wrangler> (raw)

NFSv4.2 mounts may report READ_PLUS operations separately from READ
in /proc/self/mountstats. nfsiostat parses these counters but does
not display them, leaving read activity out of its reports.

Display READ_PLUS in the default and page cache reports when the
operation is present. Document the conditional output.

Signed-off-by: Karim Manaouil <karim.manaouil@ed.ac.uk>
---
 tools/nfs-iostat/nfs-iostat.py | 4 ++++
 tools/nfs-iostat/nfsiostat.man | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
index af04aac5..2a681bbe 100755
--- a/tools/nfs-iostat/nfs-iostat.py
+++ b/tools/nfs-iostat/nfs-iostat.py
@@ -436,6 +436,8 @@ class DeviceData:
 
         if which == 0:
             self.__print_rpc_op_stats('READ', sample_time, use_mb)
+            if 'READ_PLUS' in self.__rpc_data:
+                self.__print_rpc_op_stats('READ_PLUS', sample_time, use_mb)
             self.__print_rpc_op_stats('WRITE', sample_time, use_mb)
         elif which == 1:
             self.__print_rpc_op_stats('GETATTR', sample_time, use_mb)
@@ -449,6 +451,8 @@ class DeviceData:
             self.__print_dir_cache_stats(sample_time)
         elif which == 3:
             self.__print_rpc_op_stats('READ', sample_time, use_mb)
+            if 'READ_PLUS' in self.__rpc_data:
+                self.__print_rpc_op_stats('READ_PLUS', sample_time, use_mb)
             self.__print_rpc_op_stats('WRITE', sample_time, use_mb)
             self.__print_page_stats(sample_time)
 
diff --git a/tools/nfs-iostat/nfsiostat.man b/tools/nfs-iostat/nfsiostat.man
index 4f24318d..b06e65aa 100644
--- a/tools/nfs-iostat/nfsiostat.man
+++ b/tools/nfs-iostat/nfsiostat.man
@@ -10,6 +10,8 @@ nfsiostat \- Emulate iostat for NFS mount points using /proc/self/mountstats
 The
 .B nfsiostat
 command displays NFS client per-mount statistics. 
+The default report displays READ and WRITE statistics.  It also displays
+READ_PLUS when it is present in /proc/self/mountstats.
 .TP 
 <interval>
 specifies the amount of time in seconds between each report.
@@ -126,7 +128,8 @@ only print stats for first LIST mount points
 display throughput in megabytes per second
 .TP
 .B \-p " or " \-\-page
-displays statistics related to the page cache
+displays statistics related to the page cache, including READ_PLUS
+when it is present in /proc/self/mountstats
 .TP
 .B \-s " or " \-\-sort
 Sort NFS mount points by ops/second
-- 
2.47.3


-- 
~karim

                 reply	other threads:[~2026-09-29  1:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260929012258.7objh6we7hdzqlzv@wrangler \
    --to=kmanaouil.dev@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox