meminfo: Fix the size mismatch in the swapTotal check mib for BSD. (#1345)
Signed-off-by: David O'Rourke <david.orourke@gmail.com>
This commit is contained in:
parent
f10c665d33
commit
814ef064c0
|
@ -7,7 +7,7 @@
|
||||||
* [CHANGE]
|
* [CHANGE]
|
||||||
* [FEATURE]
|
* [FEATURE]
|
||||||
* [ENHANCEMENT]
|
* [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
|
## 0.18.0 / 2019-05-09
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ func NewMemoryCollector() (Collector, error) {
|
||||||
|
|
||||||
mibSwapTotal := "vm.swap_total"
|
mibSwapTotal := "vm.swap_total"
|
||||||
/* swap_total is FreeBSD specific. Fall back to Dfly specific mib if not present. */
|
/* 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 {
|
if err != nil {
|
||||||
mibSwapTotal = "vm.swap_size"
|
mibSwapTotal = "vm.swap_size"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue