bundles/zfs: report *used*, not free storage space
This commit is contained in:
parent
73ebf746f9
commit
7f27762054
2 changed files with 8 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
|||
from subprocess import check_output
|
||||
|
||||
pools = check_output(
|
||||
['/usr/sbin/zpool', 'list', '-Hpo', 'name,free,size'],
|
||||
['/usr/sbin/zpool', 'list', '-Hpo', 'name,allocated,size'],
|
||||
env={
|
||||
'LC_ALL': 'C',
|
||||
},
|
||||
|
@ -18,14 +18,14 @@ datasets = check_output(
|
|||
|
||||
zpools = {}
|
||||
for line in pools.splitlines():
|
||||
name, free, total = line.split()
|
||||
name, used, total = line.split()
|
||||
|
||||
zpools[name] = {
|
||||
'free': free,
|
||||
'used': used,
|
||||
'total': total,
|
||||
}
|
||||
|
||||
print('zfs_pool,pool={} size={}i,free={}i'.format(name, total, free))
|
||||
print('zfs_pool,pool={} size={}i,used={}i'.format(name, total, used))
|
||||
|
||||
for line in datasets.splitlines():
|
||||
name, used, usedsnap, compressratio = line.split()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue