All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsiostat: avoid parsing "no device mounted ..." line
@ 2017-09-22 20:41 Manjunath Patil
  2017-10-05 14:56 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Manjunath Patil @ 2017-09-22 20:41 UTC (permalink / raw)
  To: linux-nfs; +Cc: manjunath.b.patil, mbpatil.linux, steved

Present nfsiostat includes the "no device mounted ..." line from
/proc/self/mountstats as addition description of the preceding mount
point. If the preceding mount point is NFS mountpoint, nfsiostat fails
to parse this line eventually. This patch avoids parsing this line.

Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
---
 tools/nfs-iostat/nfs-iostat.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
index 61d15a5..577a23d 100644
--- a/tools/nfs-iostat/nfs-iostat.py
+++ b/tools/nfs-iostat/nfs-iostat.py
@@ -429,6 +429,8 @@ def parse_stats_file(filename):
         words = line.split()
         if len(words) == 0:
             continue
+	if line.startswith("no device mounted") :
+            continue
         if words[0] == 'device':
             key = words[4]
             new = [ line.strip() ]
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsiostat: avoid parsing "no device mounted ..." line
  2017-09-22 20:41 [PATCH] nfsiostat: avoid parsing "no device mounted ..." line Manjunath Patil
@ 2017-10-05 14:56 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2017-10-05 14:56 UTC (permalink / raw)
  To: Manjunath Patil, linux-nfs; +Cc: mbpatil.linux



On 09/22/2017 04:41 PM, Manjunath Patil wrote:
> Present nfsiostat includes the "no device mounted ..." line from
> /proc/self/mountstats as addition description of the preceding mount
> point. If the preceding mount point is NFS mountpoint, nfsiostat fails
> to parse this line eventually. This patch avoids parsing this line.
> 
> Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
Committed... Sorry it took so long... 

steved.

> ---
>  tools/nfs-iostat/nfs-iostat.py |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
> index 61d15a5..577a23d 100644
> --- a/tools/nfs-iostat/nfs-iostat.py
> +++ b/tools/nfs-iostat/nfs-iostat.py
> @@ -429,6 +429,8 @@ def parse_stats_file(filename):
>          words = line.split()
>          if len(words) == 0:
>              continue
> +	if line.startswith("no device mounted") :
> +            continue
>          if words[0] == 'device':
>              key = words[4]
>              new = [ line.strip() ]
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-05 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 20:41 [PATCH] nfsiostat: avoid parsing "no device mounted ..." line Manjunath Patil
2017-10-05 14:56 ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.