Skip to content

Commit

Permalink
meminfo: Fix the size mismatch in the swapTotal check mib for BSD. (#…
Browse files Browse the repository at this point in the history
…1345)

Signed-off-by: David O'Rourke <david.orourke@gmail.com>
  • Loading branch information
phyber authored and SuperQ committed Jun 4, 2019
1 parent f97f01c commit 8c47f97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion collector/memory_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 8c47f97

Please sign in to comment.