diff --git a/CHANGELOG.md b/CHANGELOG.md index 281f0881..f5ab4fea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ * [CHANGE] * [FEATURE] * [ENHANCEMENT] -* [BUGFIX] +* [BUGFIX] Fix incorrect sysctl call in BSD meminfo collector, resulting in broken swap metrics on FreeBSD #1345 ## 0.18.0 / 2019-05-09 diff --git a/collector/memory_bsd.go b/collector/memory_bsd.go index 00bf3e55..cc6bc085 100644 --- a/collector/memory_bsd.go +++ b/collector/memory_bsd.go @@ -47,7 +47,7 @@ func NewMemoryCollector() (Collector, error) { mibSwapTotal := "vm.swap_total" /* swap_total is FreeBSD specific. Fall back to Dfly specific mib if not present. */ - _, err = unix.SysctlUint32(mibSwapTotal) + _, err = unix.SysctlUint64(mibSwapTotal) if err != nil { mibSwapTotal = "vm.swap_size" }