diff mbox series

[nfs-utils,1/8] mountstats/nfsiostat: add a function to return the fstype

Message ID 20250130142008.3600334-2-sorenson@redhat.com (mailing list archive)
State Handled Elsewhere
Headers show
Series mountstats/nfsiostat: bugfixes for iostat | expand

Commit Message

Frank Sorenson Jan. 30, 2025, 2:20 p.m. UTC
We'll need to get the DeviceData fstype when printing iostats
with multiple iterations, so we can verify that old and new
mountpoints are the same.

Signed-off-by: Frank Sorenson <sorenson@redhat.com>
---
 tools/mountstats/mountstats.py | 5 +++++
 tools/nfs-iostat/nfs-iostat.py | 5 +++++
 2 files changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
index 8e129c83..00d1ac7e 100755
--- a/tools/mountstats/mountstats.py
+++ b/tools/mountstats/mountstats.py
@@ -333,6 +333,11 @@  class DeviceData:
             found = True
             self.__parse_rpc_line(words)
 
+    def fstype(self):
+        """Return the fstype for the mountpoint
+        """
+        return self.__nfs_data['fstype']
+
     def is_nfs_mountpoint(self):
         """Return True if this is an NFS or NFSv4 mountpoint,
         otherwise return False
diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
index 31587370..95176a4b 100755
--- a/tools/nfs-iostat/nfs-iostat.py
+++ b/tools/nfs-iostat/nfs-iostat.py
@@ -187,6 +187,11 @@  class DeviceData:
             found = True
             self.__parse_rpc_line(words)
 
+    def fstype(self):
+        """Return the fstype for the mountpoint
+        """
+        return self.__nfs_data['fstype']
+
     def is_nfs_mountpoint(self):
         """Return True if this is an NFS or NFSv4 mountpoint,
         otherwise return False