Check disk io stats availability

This commit is contained in:
Kload 2013-12-05 14:35:42 +00:00
parent dbb452e29f
commit f6b0c4d553

View file

@ -78,6 +78,11 @@ def monitor_disk(units=None, mountpoint=None, human_readable=False):
else:
d['mnt_point'] = devices[dname]
result[dname] = d
for dname in devices.keys():
if len(units) > 1 and u not in result[dname]:
result[dname][u] = 'not-available'
elif len(result[dname]) == 0:
result[dname] = 'not-available'
elif u == 'filesystem':
for d in json.loads(glances.getFs()):
dmount = d['mnt_point']