summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManjunath Patil <manjunath.b.patil@oracle.com>2017-10-05 10:43:56 -0400
committerSteve Dickson <steved@redhat.com>2017-10-05 10:47:39 -0400
commit0994dc1bb7b348b7bec30f8053841e6d22caf633 (patch)
treebc0cf991841885a9eac838617b363738f1139b1f
parent9f9f9122319ceaf6e1311fb3c296d77ca711604e (diff)
downloadnfs-utils-0994dc1bb7b348b7bec30f8053841e6d22caf633.tar.gz
nfs-utils-0994dc1bb7b348b7bec30f8053841e6d22caf633.tar.xz
nfs-utils-0994dc1bb7b348b7bec30f8053841e6d22caf633.zip
nfsiostat: avoid parsing "no device mounted ..." line
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> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--tools/nfs-iostat/nfs-iostat.py2
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() ]