linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manjunath Patil <manjunath.b.patil@oracle.com>
To: linux-nfs@vger.kernel.org
Cc: manjunath.b.patil@oracle.com, mbpatil.linux@gmail.com, steved@redhat.com
Subject: [PATCH] nfsiostat: avoid parsing "no device mounted ..." line
Date: Fri, 22 Sep 2017 13:41:40 -0700	[thread overview]
Message-ID: <1506112900-15638-1-git-send-email-manjunath.b.patil@oracle.com> (raw)

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


             reply	other threads:[~2017-09-22 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 20:41 Manjunath Patil [this message]
2017-10-05 14:56 ` [PATCH] nfsiostat: avoid parsing "no device mounted ..." line Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506112900-15638-1-git-send-email-manjunath.b.patil@oracle.com \
    --to=manjunath.b.patil@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mbpatil.linux@gmail.com \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).