Skip to content

Commit b9d47c6

Browse files
committed
meminfo: Fix the size mismatch in the swapTotal check mib for BSD.
Signed-off-by: David O'Rourke <[email protected]>
1 parent f10c665 commit b9d47c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* [CHANGE]
88
* [FEATURE]
99
* [ENHANCEMENT]
10-
* [BUGFIX]
10+
* [BUGFIX] Fix incorrect sysctl call in BSD meminfo collector, resulting in broken swap metrics on FreeBSD #1345
1111

1212
## 0.18.0 / 2019-05-09
1313

collector/memory_bsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func NewMemoryCollector() (Collector, error) {
4747

4848
mibSwapTotal := "vm.swap_total"
4949
/* swap_total is FreeBSD specific. Fall back to Dfly specific mib if not present. */
50-
_, err = unix.SysctlUint32(mibSwapTotal)
50+
_, err = unix.SysctlUint64(mibSwapTotal)
5151
if err != nil {
5252
mibSwapTotal = "vm.swap_size"
5353
}

0 commit comments

Comments
 (0)