[nfs-utils] mountstats: add pNFS READs and WRITEs
diff mbox

Message ID 1474565531-3401-1-git-send-email-smayhew@redhat.com
State New
Headers show

Commit Message

Scott Mayhew Sept. 22, 2016, 5:32 p.m. UTC
These counters are already in /proc/self/mountstats but the mountstats
program doesn't display them.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 tools/mountstats/mountstats.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Steve Dickson Sept. 22, 2016, 5:35 p.m. UTC | #1
On 09/22/2016 01:32 PM, Scott Mayhew wrote:
> These counters are already in /proc/self/mountstats but the mountstats
> program doesn't display them.
> 
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Committed.... Thanks!

steved.
> ---
>  tools/mountstats/mountstats.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
> index 4ca4bc4..88ccdae 100644
> --- a/tools/mountstats/mountstats.py
> +++ b/tools/mountstats/mountstats.py
> @@ -412,6 +412,8 @@ class DeviceData:
>          print('  short reads: %d  short writes: %d' % \
>              (self.__nfs_data['shortreads'], self.__nfs_data['shortwrites']))
>          print('  NFSERR_DELAYs from server: %d' % self.__nfs_data['delay'])
> +        print('  pNFS READs: %d' % self.__nfs_data['pnfsreads'])
> +        print('  pNFS WRITEs: %d' % self.__nfs_data['pnfswrites'])
>  
>      def display_nfs_bytes(self):
>          """Pretty-print the NFS event counters
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
index 4ca4bc4..88ccdae 100644
--- a/tools/mountstats/mountstats.py
+++ b/tools/mountstats/mountstats.py
@@ -412,6 +412,8 @@  class DeviceData:
         print('  short reads: %d  short writes: %d' % \
             (self.__nfs_data['shortreads'], self.__nfs_data['shortwrites']))
         print('  NFSERR_DELAYs from server: %d' % self.__nfs_data['delay'])
+        print('  pNFS READs: %d' % self.__nfs_data['pnfsreads'])
+        print('  pNFS WRITEs: %d' % self.__nfs_data['pnfswrites'])
 
     def display_nfs_bytes(self):
         """Pretty-print the NFS event counters