]> granicus.if.org Git - zfs/commitdiff
Sort output of tunables in arc_summary.py
authorScot W. Stevenson <scot.stevenson@gmail.com>
Tue, 7 Nov 2017 22:50:15 +0000 (23:50 +0100)
committerTony Hutter <hutter2@llnl.gov>
Tue, 30 Jan 2018 16:27:30 +0000 (10:27 -0600)
Sort list of tunables printed by _tunable_summary()
alphabetically

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Scot W. Stevenson <scot.stevenson@gmail.com>
Closes #6828

cmd/arc_summary/arc_summary.py

index f4968fb6a5c5ec35ddcd437a5e5fbdd317a67521..4c513d63d84cdfba2acdc5dc61781d15b3f8591c 100755 (executable)
@@ -900,14 +900,18 @@ def _tunable_summary(Kstat):
             sys.stderr.write("Tunable descriptions will be disabled.\n")
 
     sys.stdout.write("ZFS Tunable:\n")
+    names.sort()
+
+    if alternate_tunable_layout:
+        format = "\t%s=%s\n"
+    else:
+        format = "\t%-50s%s\n"
+
     for name in names:
+
         if not name:
             continue
 
-        format = "\t%-50s%s\n"
-        if alternate_tunable_layout:
-            format = "\t%s=%s\n"
-
         if show_tunable_descriptions and name in descriptions:
             sys.stdout.write("\t# %s\n" % descriptions[name])