Bug 1527938

Summary: mountstats: Use correct RDMA terminology
Product: Red Hat Enterprise Linux 7 Reporter: Steve Dickson <steved>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: bfields, extras-qa, jlayton, rhandlin, steved, xzhou, yoyang, zlang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-1.3.0-0.55.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1527675 Environment:
Last Closed: 2018-10-30 11:48:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1527675    
Bug Blocks:    
Attachments:
Description Flags
The back ported patches none

Description Steve Dickson 2017-12-20 14:10:33 UTC
+++ This bug was initially created as a clone of Bug #1527675 +++

Description of problem:
The kernel is counting RDMA segments, not chunks. Correct the units
labels displayed by "mountstats -x", and fix up the internal names
of the counters.

Fixes: 6742ba53ae79 ("mountstats: Add option to pretty-print ...")
Signed-off-by: Chuck Lever <chuck.lever>
---
 tools/mountstats/mountstats.py |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
index 440aa72..c7fb8bb 100755
--- a/tools/mountstats/mountstats.py
+++ b/tools/mountstats/mountstats.py
@@ -120,9 +120,9 @@ XprtRdmaCounters = [
     'badxids',
     'inflightsends',
     'backlogutil',
-    'read_chunks',
-    'write_chunks',
-    'reply_chunks',
+    'read_segments',
+    'write_segments',
+    'reply_segments',
     'total_rdma_req',
     'total_rdma_rep',
     'pullup',
@@ -718,9 +718,9 @@ class DeviceData:
             if self.__rpc_data['rpcsends'] != 0:
                 print('\tAvg backlog length: %d' % \
                     (float(self.__rpc_data['backlogutil']) / self.__rpc_data['rpcsends']))
-            print('\tRead chunks: %d' % self.__rpc_data['read_chunks'])
-            print('\tWrite chunks: %d' % self.__rpc_data['write_chunks'])
-            print('\tReply chunks: %d' % self.__rpc_data['reply_chunks'])
+            print('\tRead segments: %d' % self.__rpc_data['read_segments'])
+            print('\tWrite segments: %d' % self.__rpc_data['write_segments'])
+            print('\tReply segments: %d' % self.__rpc_data['reply_segments'])
             print('\tRegistered: %d bytes' % self.__rpc_data['total_rdma_req'])
             print('\tRDMA received: %d bytes' % self.__rpc_data['total_rdma_rep'])
             print('\tTotal pull-up: %d bytes' % self.__rpc_data['pullup'])


Actual results:


Expected results:


Additional info:

Comment 2 Steve Dickson 2017-12-20 14:12:47 UTC
commit fcf9bcfe32f96038b4f544cb5297210f87c0544a
Author: Chuck Lever <chuck.lever>
Date:   Wed Dec 20 09:08:50 2017 -0500

    mountstats: Use correct RDMA terminology


commit 6742ba53ae79b83ce7ca098901144c372c428668 (tag: nfs-utils-2-2-2-rc2)
Author: Chuck Lever <chuck.lever>
Date:   Wed Dec 6 14:25:25 2017 -0500

    mountstats: Add option to pretty-print xprt statistics

Comment 3 Yongcheng Yang 2018-01-31 02:06:08 UTC
Hi Steve, should this issue wait for 7.6 or try to get in 7.5 now?

Comment 4 Steve Dickson 2018-01-31 15:44:47 UTC
(In reply to Yongcheng Yang from comment #3)
> Hi Steve, should this issue wait for 7.6 or try to get in 7.5 now?

The blocker flags is not acked so I can not do the commit... 
So this will have to wait until 7.6... but I will 
attach the backported patch

Comment 5 Steve Dickson 2018-01-31 15:45:36 UTC
Created attachment 1389068 [details]
The back ported patches

Comment 6 Yongcheng Yang 2018-03-28 11:18:06 UTC
Deferring to 7.6 now :)

Comment 7 Yongcheng Yang 2018-07-02 03:29:11 UTC
Have verified this options "-x|--xprt" is available in nfs-utils-1.3.0-0.55.el7 now:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@test-rhel7 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.55.el7.x86_64
[root@test-rhel7 ~]# man mountstats | col -b | grep xprt
       mountstats  [-h|--help]  [-v|--version]  [-f|--file  infile]  [-S|--since sincefile] [ [-n|--nfs] | [-r|--rpc] | [-R|--raw] | [-x|--xprt] ]
       -x, --xprt
[root@test-rhel7 ~]# man mountstats | col -b | grep -A 1 xprt
       mountstats  [-h|--help]  [-v|--version]  [-f|--file  infile]  [-S|--since sincefile] [ [-n|--nfs] | [-r|--rpc] | [-R|--raw] | [-x|--xprt] ]
       [mountpoint]...
--
       -x, --xprt
              Display only the transport statistics
[root@test-rhel7 ~]# mountstats -x
Stats for test-rhel7.redhat.com:/export_test mounted on /mnt/1:

        Transport protocol: tcp
        Source port: 882
        Bind count: 0
        Connect count: 1
        Connect time: 0 seconds
        Idle time: 32 seconds
        RPC requests: 32
        RPC replies: 32
        XIDs not found: 0
        Max slots: 2
        Avg backlog length: 0
        Avg send queue length: 0
        Avg pending queue length: 0

[root@test-rhel7 ~]# mountstats --xprt /mnt/1
Stats for test-rhel7.redhat.com:/export_test mounted on /mnt/1:

        Transport protocol: tcp
        Source port: 882
        Bind count: 0
        Connect count: 1
        Connect time: 0 seconds
        Idle time: 1 seconds
        RPC requests: 33
        RPC replies: 33
        XIDs not found: 0
        Max slots: 2
        Avg backlog length: 0
        Avg send queue length: 0
        Avg pending queue length: 0

[root@test-rhel7 ~]# mountstats mountstats -h
usage: mountstats mountstats [-h] [-v] [-f INFILE] [-S SINCEFILE]
                             [-n | -r | -R | -x]
                             [mountpoint [mountpoint ...]]

positional arguments:
  mountpoint            Display statistics for this mountpoint. More than one
                        may be specified. If absent, statistics for all NFS
                        mountpoints will be generated.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -f INFILE, --file INFILE
                        Read stats from infile instead of
                        /proc/self/mountstats
  -S SINCEFILE, --since SINCEFILE
                        Show difference between current stats and those in
                        SINCEFILE
  -n, --nfs             Display only the NFS statistics
  -r, --rpc             Display only the RPC statistics
  -R, --raw             Display only the raw statistics
  -x, --xprt            Display only the xprt statistics
[root@test-rhel7 ~]#

Comment 9 Yongcheng Yang 2018-07-23 11:21:15 UTC
Moving to VERIFIED according to comment #7.

Will include this test as regression check.

Comment 11 errata-xmlrpc 2018-10-30 11:48:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3311