| Reproduced on aix71-power and aix72-power with: Facter 3.14.16 (commit d3b0a04d6722084993ab2dd3ee4180718ad71942) Facter 4.0.50 Facter 3.14.16 has an issue when it outputs the mountpoints data. The value for the mountpoint's size is identical to that of the mountpoint's used space. For example:
/ => { |
available => "1.66 GiB", |
available_bytes => 1785569280, |
capacity => "54.60%", |
device => "/dev/hd4", |
filesystem => "jfs2", |
options => [ |
"rw", |
"log=/dev/hd8" |
], |
size => "*{color:red}2.00 GiB{color}*", |
size_bytes => *2147483648*, |
used => "*{color:red}2.00 GiB{color}*", |
used_bytes => *2147483648* |
}, |
/admin => { |
available => "127.64 MiB", |
available_bytes => 133844992, |
capacity => "50.07%", |
device => "/dev/hd11admin", |
filesystem => "jfs2", |
options => [ |
"rw", |
"log=/dev/hd8" |
], |
size => "{color:red}*128.00 MiB*{color}", |
size_bytes => *134217728*, |
used => "*{color:red}128.00 MiB{color}*", |
used_bytes => *134217728* |
},
|
Also by subtracting the available space from the total size we don't get the used space. On the other hand when requesting the mountpoints fact with Facter 4.0.50 we see that the only difference, is in the used_bytes and capacity values. Data for the same mountpoints:
/ => { |
available => "1.66 GiB", |
available_bytes => 1785569280, |
capacity => "16.85%", |
size => "2.00 GiB", |
size_bytes => 2147483648, |
used => "345.15 MiB", |
used_bytes => 361914368 |
}, |
/admin => { |
available => "127.64 MiB", |
available_bytes => 133844992, |
capacity => "0.28%", |
size => "128.00 MiB", |
size_bytes => 134217728, |
used => "364.00 KiB", |
used_bytes => 372736 |
},
|
Here we can see that the values make sense, the capacity is correctly calculated. Also this data is backed up by what we see when running
df -P |
|
Filesystem 512-blocks Used Available Capacity Mounted on |
/dev/hd4 4194304 706864 3487440 17% / |
/dev/hd11admin 262144 728 261416 1% /admin
|
In the above output capacities are rounded and the size, used and available values are calculated with the following formula:
value * 512 = value_in_bytes
|
Ex: mountpoint /: Available: 3487440 * 512 = 1785569280 (what Facter 4 prints for available_bytes) Used: 706864 *512 = 361914368 (what Facter 4 prints for used_bytes) Size: 4194304 * 512 = 2147483648 (what Facter 4 prints for size_bytes) |