AIX: Fix disk blocks to bytes conversion

Signed-off-by: Johannes Ziemke <github@5pi.de>
This commit is contained in:
Johannes Ziemke 2025-05-26 16:38:20 +02:00 committed by Johannes 'fish' Ziemke
parent 4d053b94a9
commit 709388ed15

View file

@ -53,9 +53,9 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
mountPoint: stat.MountPoint, mountPoint: stat.MountPoint,
fsType: fstype, fsType: fstype,
}, },
size: float64(stat.TotalBlocks / 512.0), size: float64(stat.TotalBlocks * 512.0),
free: float64(stat.FreeBlocks / 512.0), free: float64(stat.FreeBlocks * 512.0),
avail: float64(stat.FreeBlocks / 512.0), // AIX doesn't distinguish between free and available blocks. avail: float64(stat.FreeBlocks * 512.0), // AIX doesn't distinguish between free and available blocks.
files: float64(stat.TotalInodes), files: float64(stat.TotalInodes),
filesFree: float64(stat.FreeInodes), filesFree: float64(stat.FreeInodes),
ro: ro, ro: ro,