Blame SOURCES/nfs-utils-2.3.3-nfsclnts-cmd.patch

6f21ac
diff -up nfs-utils-2.3.3/configure.ac.orig nfs-utils-2.3.3/configure.ac
6f21ac
--- nfs-utils-2.3.3/configure.ac.orig	2020-06-09 10:58:50.178258035 -0400
6f21ac
+++ nfs-utils-2.3.3/configure.ac	2020-06-09 11:02:04.203102954 -0400
6f21ac
@@ -639,6 +639,7 @@ AC_CONFIG_FILES([
6f21ac
 	tools/rpcgen/Makefile
6f21ac
 	tools/mountstats/Makefile
6f21ac
 	tools/nfs-iostat/Makefile
6f21ac
+	tools/nfsdclnts/Makefile
6f21ac
 	tools/nfsconf/Makefile
6f21ac
 	tools/nfsdclddb/Makefile
6f21ac
 	utils/Makefile
6f21ac
diff -up nfs-utils-2.3.3/tools/Makefile.am.orig nfs-utils-2.3.3/tools/Makefile.am
6f21ac
--- nfs-utils-2.3.3/tools/Makefile.am.orig	2020-06-09 10:58:50.178258035 -0400
6f21ac
+++ nfs-utils-2.3.3/tools/Makefile.am	2020-06-09 11:02:04.203102954 -0400
6f21ac
@@ -12,6 +12,6 @@ if CONFIG_NFSDCLD
6f21ac
 OPTDIRS += nfsdclddb
6f21ac
 endif
6f21ac
 
6f21ac
-SUBDIRS = locktest rpcdebug nlmtest mountstats nfs-iostat $(OPTDIRS)
6f21ac
+SUBDIRS = locktest rpcdebug nlmtest mountstats nfs-iostat nfsdclnts $(OPTDIRS)
6f21ac
 
6f21ac
 MAINTAINERCLEANFILES = Makefile.in
6f21ac
diff -up nfs-utils-2.3.3/tools/nfsdclnts/Makefile.am.orig nfs-utils-2.3.3/tools/nfsdclnts/Makefile.am
6f21ac
--- nfs-utils-2.3.3/tools/nfsdclnts/Makefile.am.orig	2020-06-09 11:02:04.203102954 -0400
6f21ac
+++ nfs-utils-2.3.3/tools/nfsdclnts/Makefile.am	2020-06-09 11:02:04.203102954 -0400
6f21ac
@@ -0,0 +1,13 @@
6f21ac
+## Process this file with automake to produce Makefile.in
6f21ac
+PYTHON_FILES = nfsdclnts.py
6f21ac
+
6f21ac
+man8_MANS       = nfsdclnts.man
6f21ac
+
6f21ac
+EXTRA_DIST      = $(man8_MANS) $(PYTHON_FILES)
6f21ac
+
6f21ac
+all-local: $(PYTHON_FILES)
6f21ac
+
6f21ac
+install-data-hook:
6f21ac
+	$(INSTALL) -m 755 nfsdclnts.py $(DESTDIR)$(sbindir)/nfsdclnts
6f21ac
+
6f21ac
+MAINTAINERCLEANFILES=Makefile.in
6f21ac
diff -up nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.man.orig nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.man
6f21ac
--- nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.man.orig	2020-06-09 11:02:04.203102954 -0400
6f21ac
+++ nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.man	2020-06-09 11:02:04.203102954 -0400
6f21ac
@@ -0,0 +1,180 @@
6f21ac
+.\"
6f21ac
+.\" nfsdclnts(8)
6f21ac
+.\"
6f21ac
+.TH "NFSDCLTS" "8" "2020-05-09" "nfsdclnts" "nfsdclnts"
6f21ac
+.ie \n(.g .ds Aq \(aq
6f21ac
+.el       .ds Aq '
6f21ac
+.ss \n[.ss] 0
6f21ac
+.nh
6f21ac
+.ad l
6f21ac
+.de URL
6f21ac
+\fI\\$2\fP <\\$1>\\$3
6f21ac
+..
6f21ac
+.als MTO URL
6f21ac
+.if \n[.g] \{\
6f21ac
+.  mso www.tmac
6f21ac
+.  am URL
6f21ac
+.    ad l
6f21ac
+.  .
6f21ac
+.  am MTO
6f21ac
+.    ad l
6f21ac
+.  .
6f21ac
+.  LINKSTYLE blue R < >
6f21ac
+.\}
6f21ac
+.SH "NAME"
6f21ac
+nfsdclnts \- print various nfs client information for knfsd server.
6f21ac
+.SH "SYNOPSIS"
6f21ac
+.sp
6f21ac
+\fBnfsdclnts\fP [\fI\-h\fP] [\fI\-t type\fP] [\fI\-\-clientinfo\fP] [\fI\-\-hostname\fP] [\fI\-q\fP]
6f21ac
+.SH "DESCRIPTION"
6f21ac
+.sp
6f21ac
+The nfsdclnts(8) command parses the content present in /proc/fs/nfsd/clients/ directories. nfsdclnts(8) displays files which are open, locked, delegated by the nfs\-client. It also prints useful client information such as hostname, clientID, NFS version mounted by the nfs\-client.
6f21ac
+.SH "OPTIONS"
6f21ac
+.sp
6f21ac
+\fB\-t, \-\-type\fP=TYPE
6f21ac
+.RS 4
6f21ac
+Specify the type of file to be displayed. Takes only one TYPE at a time.
6f21ac
+.sp
6f21ac
+\fIopen\fP, \fIlock\fP, \fIdeleg\fP, \fIlayout\fP, or \fIall\fP
6f21ac
+.sp
6f21ac
+open: displays the open files by nfs\-client(s).
6f21ac
+.sp
6f21ac
+lock: displays the files locked by nfs\-client(s).
6f21ac
+.sp
6f21ac
+layout: displays the files for which layout is given.
6f21ac
+.sp
6f21ac
+deleg: displays delegated files information and delegation type.
6f21ac
+.sp
6f21ac
+all: prints all the above type.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+\fB\-\-clientinfo\fP
6f21ac
+.RS 4
6f21ac
+displays various nfs\-client info fields such as version of nfs mounted at nfs\-client and clientID.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+\fB\-\-hostname\fP
6f21ac
+.RS 4
6f21ac
+Print hostname of nfs\-client instead of ip-address.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+\fB\-q, \-\-quiet\fP
6f21ac
+.RS 4
6f21ac
+Hide the header information.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+\fB\-v, \-\-verbose\fP
6f21ac
+.RS 4
6f21ac
+Verbose operation, show debug messages.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+\fB\-f, \-\-file\fP
6f21ac
+.RS 4
6f21ac
+Instead of processing all client directories under /proc/fs/nfsd/clients, one can provide a specific
6f21ac
+states file to process. One should make sure that info file resides in the same directory as states file.
6f21ac
+If the info file is not valid or present the fields would be marked as "N/A".
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+\fB\-h, \-\-help\fP
6f21ac
+.RS 4
6f21ac
+Print help explaining the command line options.
6f21ac
+.SH "EXAMPLES"
6f21ac
+.sp
6f21ac
+\fBnfsdclnts \-\-type open\fP
6f21ac
+.RS 4
6f21ac
+List all files with open type only.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+.if n .RS 4
6f21ac
+.nf
6f21ac
+Inode number | Type   | Access | Deny | ip address            | Filename
6f21ac
+33823232     | open   | r\-     | \-\-   | [::1]:757             | testfile
6f21ac
+.fi
6f21ac
+.if n .RE
6f21ac
+.sp
6f21ac
+\fBnfsdclnts \-\-type deleg\fP
6f21ac
+.RS 4
6f21ac
+List all files with deleg type only.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+.if n .RS 4
6f21ac
+.nf
6f21ac
+Inode number | Type   | Access | ip address            | Filename
6f21ac
+33823232     | deleg  | r      | [::1]:757             | testfile
6f21ac
+.fi
6f21ac
+.if n .RE
6f21ac
+.sp
6f21ac
+\fBnfsdclnts \-\-hostname\fP
6f21ac
+.RS 4
6f21ac
+Print hostname instead of ip\-address.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+.if n .RS 4
6f21ac
+.nf
6f21ac
+Inode number | Type   | Access | Deny | Hostname              | Filename
6f21ac
+33823232     | open   | r\-     | \-\-   | nfs\-server            | testfile
6f21ac
+33823232     | deleg  | r      |      | nfs\-server            | testfile
6f21ac
+.fi
6f21ac
+.if n .RE
6f21ac
+.sp
6f21ac
+\fBnfsdclnts \-\-clientinfo\fP
6f21ac
+.RS 4
6f21ac
+Print client information.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+.if n .RS 4
6f21ac
+.nf
6f21ac
+Inode number | Type   | Access | Deny | ip address            | Client ID           | vers | Filename
6f21ac
+33823232     | open   | r\-     | \-\-   | [::1]:757             | 0xc79a009f5eb65e84  | 4.2  | testfile
6f21ac
+33823232     | deleg  | r      |      | [::1]:757             | 0xc79a009f5eb65e84  | 4.2  | testfile
6f21ac
+.fi
6f21ac
+.if n .RE
6f21ac
+.sp
6f21ac
+\fBnfsdclnts \-\-file /proc/fs/nfsd/clients/3/states -t open\fP
6f21ac
+.RS 4
6f21ac
+Process specific states file.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+.if n .RS 4
6f21ac
+.nf
6f21ac
+Inode number | Type   | Access | Deny | ip address            | Client ID           | vers | Filename
6f21ac
+33823232     | open   | r\-     | \-\-   | [::1]:757             | 0xc79a009f5eb65e84  | 4.2  | testfile
6f21ac
+.fi
6f21ac
+.if n .RE
6f21ac
+.sp
6f21ac
+\fBnfsdclnts \-\-quiet \-\-hostname\fP
6f21ac
+.RS 4
6f21ac
+Hide the header information.
6f21ac
+.RE
6f21ac
+.sp
6f21ac
+.if n .RS 4
6f21ac
+.nf
6f21ac
+33823232     | open   | r\-     | \-\-   | nfs\-server            | testfile
6f21ac
+33823232     | deleg  | r      |      | nfs\-server            | testfile
6f21ac
+.fi
6f21ac
+.if n .RE
6f21ac
+.SH "FILES"
6f21ac
+.sp
6f21ac
+\fB/proc/fs/nfsd/clients/\fP
6f21ac
+.sp
6f21ac
+Displays basic information about each NFSv4 client.
6f21ac
+.sp
6f21ac
+\fB/proc/fs/nfsd/clients/#/info\fP
6f21ac
+.sp
6f21ac
+Displays information about all the opens held by the given client, including open modes, device numbers, inode numbers, and open owners.
6f21ac
+.sp
6f21ac
+\fB/proc/fs/nfsd/clients/#/states\fP
6f21ac
+.SH "NOTES"
6f21ac
+.sp
6f21ac
+/proc/fs/nfsd/clients/ support was initially introduced in 5.3 kernel and is only implemented for mount points using NFSv4.
6f21ac
+.SH "BUGS"
6f21ac
+Please report any BUGs to \c
6f21ac
+.MTO "linux\-nfs\(atvger.kernel.org" "" ""
6f21ac
+.SH SEE ALSO
6f21ac
+.BR nfsd (8),
6f21ac
+.BR exportfs (8),
6f21ac
+.BR idmapd (8),
6f21ac
+.BR statd (8)
6f21ac
+.SH "AUTHORS"
6f21ac
+Achilles Gaikwad <agaikwad@redhat.com> and
6f21ac
+Kenneth D'souza  <kdsouza@redhat.com>
6f21ac
diff -up nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.py.orig nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.py
6f21ac
--- nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.py.orig	2020-06-09 11:02:04.203102954 -0400
6f21ac
+++ nfs-utils-2.3.3/tools/nfsdclnts/nfsdclnts.py	2020-06-09 11:02:04.203102954 -0400
6f21ac
@@ -0,0 +1,254 @@
6f21ac
+#!/usr/bin/python3
6f21ac
+# -*- python-mode -*-
6f21ac
+'''
6f21ac
+    Copyright (C) 2020
6f21ac
+    Authors:    Achilles Gaikwad <agaikwad@redhat.com>
6f21ac
+                Kenneth  D'souza <kdsouza@redhat.com>
6f21ac
+
6f21ac
+    This program is free software: you can redistribute it and/or modify
6f21ac
+    it under the terms of the GNU General Public License as published by
6f21ac
+    the Free Software Foundation, either version 3 of the License, or
6f21ac
+    (at your option) any later version.
6f21ac
+
6f21ac
+    This program is distributed in the hope that it will be useful,
6f21ac
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
6f21ac
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6f21ac
+    GNU General Public License for more details.
6f21ac
+
6f21ac
+    You should have received a copy of the GNU General Public License
6f21ac
+    along with this program.  If not, see <https://www.gnu.org/licenses/>.
6f21ac
+'''
6f21ac
+
6f21ac
+import multiprocessing as mp
6f21ac
+import os
6f21ac
+import signal
6f21ac
+import sys
6f21ac
+
6f21ac
+try:
6f21ac
+    import argparse
6f21ac
+except ImportError:
6f21ac
+    print('%s:  Failed to import argparse - make sure argparse is installed!'
6f21ac
+        % sys.argv[0])
6f21ac
+    sys.exit(1)
6f21ac
+try:
6f21ac
+    import yaml
6f21ac
+except ImportError:
6f21ac
+    print('%s:  Failed to import yaml - make sure python3-pyyaml is installed!'
6f21ac
+        % sys.argv[0])
6f21ac
+    sys.exit(1)
6f21ac
+
6f21ac
+BBOLD = '\033[1;30;47m' #Bold black text with white background.
6f21ac
+ENDC = '\033[m' #Rest to defaults
6f21ac
+
6f21ac
+def init_worker():
6f21ac
+    signal.signal(signal.SIGINT, signal.SIG_IGN)
6f21ac
+
6f21ac
+# this function converts the info file to a dictionary format, sorta. 
6f21ac
+def file_to_dict(path):
6f21ac
+    client_info = {}
6f21ac
+    try:
6f21ac
+        with open(path) as f:
6f21ac
+            for line in f:
6f21ac
+                try:
6f21ac
+                    (key, val) = line.split(':', 1)
6f21ac
+                    client_info[key] = val.strip()
6f21ac
+                    # FIXME: There has to be a better way of converting the info file to a dictionary.
6f21ac
+                except ValueError as reason:
6f21ac
+                    if verbose:
6f21ac
+                        print('Exception occured, %s' % reason)
6f21ac
+
6f21ac
+        if len(client_info) == 0 and verbose:
6f21ac
+            print("Provided %s file is not valid" %path)
6f21ac
+        return client_info
6f21ac
+
6f21ac
+    except OSError as reason:
6f21ac
+        if verbose:
6f21ac
+            print('%s' % reason)
6f21ac
+
6f21ac
+# this function gets the paths from /proc/fs/nfsd/clients/
6f21ac
+# returns a list of paths for each client which has nfs-share mounted.
6f21ac
+def getpaths():
6f21ac
+    path = []
6f21ac
+    try:
6f21ac
+        dirs = os.listdir('/proc/fs/nfsd/clients/')
6f21ac
+    except OSError as reason:
6f21ac
+        exit('%s' % reason)
6f21ac
+    if len(dirs) !=0:
6f21ac
+	    for i in dirs:
6f21ac
+                path.append('/proc/fs/nfsd/clients/' + i + '/states')
6f21ac
+	    return (path)
6f21ac
+    else:
6f21ac
+        exit('Nothing to process')
6f21ac
+
6f21ac
+# A single function to rule them all, in this function we gather all the data
6f21ac
+# from already populated data_list and client_info.
6f21ac
+def printer(data_list, argument):
6f21ac
+    client_info_path = data_list.pop()
6f21ac
+    client_info = file_to_dict(client_info_path)
6f21ac
+    for i in data_list:
6f21ac
+        for key in i:
6f21ac
+            inode = i[key]['superblock'].split(':')[-1]
6f21ac
+            # The ip address is quoted, so we dequote it.
6f21ac
+            try:
6f21ac
+                client_ip = client_info['address'][1:-1]
6f21ac
+            except:
6f21ac
+                client_ip = "N/A"
6f21ac
+            try:
6f21ac
+                # if the nfs-server reboots while the nfs-client holds the files open,
6f21ac
+                # the nfs-server would print the filename as '/'. For such instaces we
6f21ac
+                # print the output as disconnected dentry instead of '/'.
6f21ac
+                if(i[key]['filename']=='/'):
6f21ac
+                    fname = 'disconnected dentry'
6f21ac
+                else:
6f21ac
+                    fname = i[key]['filename'].split('/')[-1]
6f21ac
+            except KeyError:
6f21ac
+                # for older kernels which do not have the fname patch in kernel, they
6f21ac
+                # won't be able to see the fname field. Therefore post it as N/A.
6f21ac
+                fname = "N/A"
6f21ac
+            otype = i[key]['type']
6f21ac
+            try:
6f21ac
+                access = i[key]['access']
6f21ac
+            except:
6f21ac
+                access = ''
6f21ac
+            try:
6f21ac
+                deny = i[key]['deny']
6f21ac
+            except:
6f21ac
+                deny = ''
6f21ac
+            try:
6f21ac
+                hostname = client_info['name'].split()[-1].split('"')[0]
6f21ac
+                hostname =  hostname.split('.')[0]
6f21ac
+                # if the hostname is too long, it messes up with the output being in columns,
6f21ac
+                # therefore we truncate the hostname followed by two '..' as suffix.
6f21ac
+                if len(hostname) > 20:
6f21ac
+                    hostname = hostname[0:20] + '..'
6f21ac
+            except:
6f21ac
+                hostname = "N/A"
6f21ac
+            try:
6f21ac
+                clientid = client_info['clientid']
6f21ac
+            except:
6f21ac
+                clientid = "N/A"
6f21ac
+            try:
6f21ac
+                minorversion = "4." + client_info['minor version']
6f21ac
+            except:
6f21ac
+                minorversion = "N/A"
6f21ac
+
6f21ac
+            otype = i[key]['type']
6f21ac
+            # since some fields do not have deny column, we drop those if -t is either
6f21ac
+            # layout or lock.
6f21ac
+            drop = ['layout', 'lock']
6f21ac
+
6f21ac
+            # Printing the output this way instead of a single string which is concatenated
6f21ac
+            # this makes it better to quickly add more columns in future.
6f21ac
+            if(otype == argument.type or  argument.type == 'all'):
6f21ac
+                print('%-13s' %inode, end='| ')
6f21ac
+                print('%-7s' %otype, end='| ')
6f21ac
+                if (argument.type not in drop):
6f21ac
+                    print('%-7s' %access, end='| ')
6f21ac
+                if (argument.type not in drop and argument.type !='deleg'):
6f21ac
+                    print('%-5s' %deny, end='| ')
6f21ac
+                if (argument.hostname == True):
6f21ac
+                    print('%-22s' %hostname, end='| ')
6f21ac
+                else:
6f21ac
+                   print('%-22s' %client_ip, end='| ')
6f21ac
+                if (argument.clientinfo == True) :
6f21ac
+                    print('%-20s' %clientid, end='| ')
6f21ac
+                    print('%-5s' %minorversion, end='| ')
6f21ac
+                print(fname)
6f21ac
+
6f21ac
+def opener(path):
6f21ac
+    try:
6f21ac
+        with open(path, 'r') as nfsdata:
6f21ac
+            try:
6f21ac
+                data = yaml.load(nfsdata, Loader = yaml.BaseLoader)
6f21ac
+                if data is not None:
6f21ac
+                    clientinfo = path.rsplit('/', 1)[0] + '/info'
6f21ac
+                    data.append(clientinfo)
6f21ac
+                return data
6f21ac
+            except:
6f21ac
+                if verbose:
6f21ac
+                    print("Exception occurred, Please make sure %s is a YAML file" %path)
6f21ac
+
6f21ac
+    except OSError as reason:
6f21ac
+        if verbose:
6f21ac
+            print('%s' % reason)
6f21ac
+
6f21ac
+def print_cols(argument):
6f21ac
+    title_inode = 'Inode number'
6f21ac
+    title_otype = 'Type'
6f21ac
+    title_access = 'Access'
6f21ac
+    title_deny = 'Deny'
6f21ac
+    title_fname = 'Filename'
6f21ac
+    title_clientID = 'Client ID'
6f21ac
+    title_hostname = 'Hostname'
6f21ac
+    title_ip = 'ip address'
6f21ac
+    title_nfsvers = 'vers'
6f21ac
+
6f21ac
+    drop = ['lock', 'layout']
6f21ac
+    print(BBOLD, end='')
6f21ac
+    print('%-13s' %title_inode, end='| ')
6f21ac
+    print('%-7s' %title_otype, end='| ')
6f21ac
+    if (argument.type not in drop):
6f21ac
+        print('%-7s' %title_access, end='| ')
6f21ac
+    if (argument.type not in drop and argument.type !='deleg'):
6f21ac
+        print('%-5s' %title_deny, end='| ')
6f21ac
+    if (argument.hostname == True):
6f21ac
+        print('%-22s' %title_hostname, end='| ')
6f21ac
+    else:
6f21ac
+        print('%-22s' %title_ip, end='| ')
6f21ac
+    if (argument.clientinfo == True):
6f21ac
+        print('%-20s' %title_clientID, end='| ')
6f21ac
+        print('%-5s' %title_nfsvers, end='| ')
6f21ac
+    print(title_fname, end='')
6f21ac
+    print(ENDC)
6f21ac
+
6f21ac
+def nfsd4_show():
6f21ac
+
6f21ac
+    parser = argparse.ArgumentParser(description = 'Parse the nfsd states and clientinfo files.')
6f21ac
+    parser.add_argument('-t', '--type', metavar = 'type', type = str, choices = ['open',
6f21ac
+        'deleg', 'lock', 'layout', 'all'],
6f21ac
+        default = 'all',
6f21ac
+        help = 'Input the type that you want to be printed: open, lock, deleg, layout, all')
6f21ac
+    parser.add_argument('--clientinfo', action = 'store_true',
6f21ac
+        help = 'output clients information, --hostname is implied.')
6f21ac
+    parser.add_argument('--hostname', action = 'store_true',
6f21ac
+        help = 'print hostname of client instead of its ip address. Longer hostnames are truncated.')
6f21ac
+    parser.add_argument('-v', '--verbose', action = 'store_true',
6f21ac
+        help = 'Verbose operation, show debug messages.')
6f21ac
+    parser.add_argument('-f', '--file', nargs='+', type = str, metavar='',
6f21ac
+        help = 'pass client states file, provided that info file resides in the same directory.')
6f21ac
+    parser.add_argument('-q', '--quiet', action = 'store_true',
6f21ac
+        help = 'don\'t print the header information')
6f21ac
+
6f21ac
+    args = parser.parse_args()
6f21ac
+
6f21ac
+    global verbose
6f21ac
+    verbose = False
6f21ac
+    if args.verbose:
6f21ac
+        verbose = True
6f21ac
+
6f21ac
+    if args.file:
6f21ac
+        paths = args.file
6f21ac
+    else:
6f21ac
+        paths = getpaths()
6f21ac
+
6f21ac
+    p = mp.Pool(mp.cpu_count(), init_worker)
6f21ac
+    try:
6f21ac
+        result = p.map(opener, paths)
6f21ac
+        ### Drop None entries from list
6f21ac
+        final_result = list(filter(None, result))
6f21ac
+        p.close()
6f21ac
+        p.join()
6f21ac
+
6f21ac
+        if len(final_result) !=0 and not args.quiet:
6f21ac
+            print_cols(args)
6f21ac
+
6f21ac
+        for item in final_result:
6f21ac
+            printer(item, args)
6f21ac
+
6f21ac
+    except KeyboardInterrupt:
6f21ac
+        print('Caught KeyboardInterrupt, terminating workers')
6f21ac
+        p.terminate()
6f21ac
+        p.join()
6f21ac
+
6f21ac
+if __name__ == "__main__":
6f21ac
+    nfsd4_show()