mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Check disk io stats availability
This commit is contained in:
parent
dbb452e29f
commit
f6b0c4d553
1 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,11 @@ def monitor_disk(units=None, mountpoint=None, human_readable=False):
|
||||||
else:
|
else:
|
||||||
d['mnt_point'] = devices[dname]
|
d['mnt_point'] = devices[dname]
|
||||||
result[dname] = d
|
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':
|
elif u == 'filesystem':
|
||||||
for d in json.loads(glances.getFs()):
|
for d in json.loads(glances.getFs()):
|
||||||
dmount = d['mnt_point']
|
dmount = d['mnt_point']
|
||||||
|
|
Loading…
Reference in a new issue