Error while starting nfsiostat: ValueError: invalid literal for long() with base 10: 'device'
Experienced this on CentOS6 with version nfs-utils-1.2.3-36.el6.x86_64
.
abhijeet.ras@box ~ [ 6:03:57]
$ 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'
abhijeet.ras@box ~ 1 [ 6:04:21]
Going through the code, I noticed that it wasn't able to parse file /proc/self/mountstats correctly. For now, I've added
if line.startswith("no device mounted"):
continue
in the code. Have sent a mail to ML for further discussion.