* Bug: nfsiostat fails to parse file /proc/self/mountstats in some cases
@ 2013-07-31 12:11 Abhijeet Rastogi
2013-08-06 17:36 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Abhijeet Rastogi @ 2013-07-31 12:11 UTC (permalink / raw)
To: linux-nfs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: nfsiostat fails to parse file /proc/self/mountstats in some cases
2013-07-31 12:11 Bug: nfsiostat fails to parse file /proc/self/mountstats in some cases Abhijeet Rastogi
@ 2013-08-06 17:36 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2013-08-06 17:36 UTC (permalink / raw)
To: Abhijeet Rastogi; +Cc: linux-nfs
On 31/07/13 08:11, Abhijeet Rastogi wrote:
> 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
What version of nfs-utils are you using?
>
> 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?
Please post a formal patch. Here are some guidelines to follow
https://www.kernel.org/doc/Documentation/SubmittingPatches
But in a nutshell, here is what I do.
git clone git://linux-nfs.org/~steved/nfs-utils.git
cd nfs-utils.git
<make the change to tools/nfs-iostat/nfs-iostat.py>
<test the change to tools/nfs-iostat/nfs-iostat.py>
git commit -s -a
<describe what that patch does; See section 2 of SubmittingPatches>
git format-patch -1
<there will be a 0001- patch file in the current directory>
git send-email --suppress-cc=all --suppress-from --no-chain-reply-to \
--from "Abhijeet Rastogi <abhijeet.1989@gmail.com>"
--to "Steve Dickson <steved@redhat.com>"
--cc "Linux NFS Mailing List <linux-nfs@vger.kernel.org>"
Note: I --dry-run flag to test the git send-email command before
I actually send the mail.
I hope this helps...
steved.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-06 17:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 12:11 Bug: nfsiostat fails to parse file /proc/self/mountstats in some cases Abhijeet Rastogi
2013-08-06 17:36 ` Steve Dickson
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).