Blame SOURCES/nfs-utils-2.3.3-nfsiostat-key-error.patch

73ac72
diff -up nfs-utils-2.3.3/tools/mountstats/mountstats.py.orig nfs-utils-2.3.3/tools/mountstats/mountstats.py
73ac72
--- nfs-utils-2.3.3/tools/mountstats/mountstats.py.orig	2020-12-10 10:48:17.319579958 -0500
73ac72
+++ nfs-utils-2.3.3/tools/mountstats/mountstats.py	2020-12-10 10:52:42.481484160 -0500
73ac72
@@ -943,10 +943,11 @@ def print_iostat_summary(old, new, devic
73ac72
         if not old or device not in old:
73ac72
             stats.display_iostats(time)
73ac72
         else:
73ac72
-            old_stats = DeviceData()
73ac72
-            old_stats.parse_stats(old[device])
73ac72
-            diff_stats = stats.compare_iostats(old_stats)
73ac72
-            diff_stats.display_iostats(time)
73ac72
+            if ("fstype autofs" not in str(old[device])) and ("fstype autofs" not in str(new[device])):
73ac72
+                old_stats = DeviceData()
73ac72
+                old_stats.parse_stats(old[device])
73ac72
+                diff_stats = stats.compare_iostats(old_stats)
73ac72
+                diff_stats.display_iostats(time)
73ac72
 
73ac72
 def iostat_command(args):
73ac72
     """iostat-like command for NFS mount points
73ac72
diff -up nfs-utils-2.3.3/tools/nfs-iostat/nfs-iostat.py.orig nfs-utils-2.3.3/tools/nfs-iostat/nfs-iostat.py
73ac72
--- nfs-utils-2.3.3/tools/nfs-iostat/nfs-iostat.py.orig	2020-12-10 10:48:17.316579880 -0500
73ac72
+++ nfs-utils-2.3.3/tools/nfs-iostat/nfs-iostat.py	2020-12-10 10:52:42.481484160 -0500
73ac72
@@ -467,10 +467,13 @@ def parse_stats_file(filename):
73ac72
 def print_iostat_summary(old, new, devices, time, options):
73ac72
     stats = {}
73ac72
     diff_stats = {}
73ac72
+    devicelist = []
73ac72
     if old:
73ac72
         # Trim device list to only include intersection of old and new data,
73ac72
         # this addresses umounts due to autofs mountpoints
73ac72
-        devicelist = [x for x in old if x in devices]
73ac72
+        for device in devices:
73ac72
+            if "fstype autofs" not in str(old[device]):
73ac72
+                devicelist.append(device)
73ac72
     else:
73ac72
         devicelist = devices
73ac72