From: Abhijeet Rastogi <abhijeet.1989@gmail.com>
To: linux-nfs@vger.kernel.org
Subject: Bug: nfsiostat fails to parse file /proc/self/mountstats in some cases
Date: Wed, 31 Jul 2013 17:41:57 +0530 [thread overview]
Message-ID: <CACXxYfy6ySZOLTRGWfZjnozHP5irHa9N=DS=3AUH8RWgUtY35Q@mail.gmail.com> (raw)
Hi all,
So, this is what I'm observing.
$ sudo nfsiostat
Traceback (most recent call last):
File " in="" line="" module="" nfsiostat="" sbin="" usr="">
iostat_command(prog)
File "/usr/sbin/nfsiostat", line 587, in iostat_command
devices = list_nfs_mounts(origdevices, mountstats)
File "/usr/sbin/nfsiostat", line 490, in list_nfs_mounts
stats.parse_stats(descr)
File "/usr/sbin/nfsiostat", line 179, in parse_stats
self.__parse_rpc_line(words)
File "/usr/sbin/nfsiostat", line 163, in __parse_rpc_line
self.__rpc_data[op] = [long(word) for word in words[1:]]
ValueError: invalid literal for long() with base 10: 'device'
This happens because it's unexpected for nfsiostat to find line "no
device mounted on /sys/kernel/debug with fstype debugfs" in
/proc/self/mountstats. http://pb.abhijeetr.com/UREA
For now, I added
if line.startswith("no device mounted"):
continue
to fix the issue in parse_stats_file function. http://pb.abhijeetr.com/HUXO
Please ask if any more info is required. What's the best way to handle
it so that it can be added to upstream code?
--
Regards,
Abhijeet Rastogi (shadyabhi)
http://blog.abhijeetr.com
next reply other threads:[~2013-07-31 12:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-31 12:11 Abhijeet Rastogi [this message]
2013-08-06 17:36 ` Bug: nfsiostat fails to parse file /proc/self/mountstats in some cases 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='CACXxYfy6ySZOLTRGWfZjnozHP5irHa9N=DS=3AUH8RWgUtY35Q@mail.gmail.com' \
--to=abhijeet.1989@gmail.com \
--cc=linux-nfs@vger.kernel.org \
/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).