Bug: nfsiostat fails to parse file /proc/self/mountstats in some cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux