You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+MA 02110-1301 USA
"""
import sys, os, time
self.__nfs_data['fstype'] = words[7]
if words[7] == 'nfs':
self.__nfs_data['statvers'] = words[8]
+ elif 'nfs' in words or 'nfs4' in words:
+ self.__nfs_data['export'] = words[0]
+ self.__nfs_data['mountpoint'] = words[3]
+ self.__nfs_data['fstype'] = words[6]
+ if words[6] == 'nfs':
+ self.__nfs_data['statvers'] = words[7]
elif words[0] == 'age:':
self.__nfs_data['age'] = long(words[1])
elif words[0] == 'opts:':
if words[0] == 'device':
key = words[4]
new = [ line.strip() ]
+ elif 'nfs' in words or 'nfs4' in words:
+ key = words[3]
+ new = [ line.strip() ]
else:
new += [ line.strip() ]
ms_dict[key] = new
def print_iostat_summary(old, new, devices, time, options):
stats = {}
diff_stats = {}
-
if old:
# Trim device list to only include intersection of old and new data,
# this addresses umounts due to autofs mountpoints
parser.add_option_group(displaygroup)
(options, args) = parser.parse_args(sys.argv)
-
for arg in args:
if arg == sys.argv[0]:
while count != 0:
print_iostat_summary(old_mountstats, mountstats, devices, sample_time, options)
old_mountstats = mountstats
- if count != 1:
- time.sleep(interval)
+ time.sleep(interval)
sample_time = interval
mountstats = parse_stats_file('/proc/self/mountstats')
# automount mountpoints add and drop, if automount is involved