From 8d9c7ca65915eff54f470bc45b166c7085054d79 Mon Sep 17 00:00:00 2001 From: Ralf Horstmann Date: Fri, 16 Feb 2018 11:34:41 +0100 Subject: [PATCH] Use swpginuse instead of swpgonly in meminfo_openbsd (#813) All tools in OpenBSD base system use swpginuse instead of swpgonly for reporting swap usage (snmpd, swapctl, top, vmstat), so let memory collector use that as well for consistency. --- collector/meminfo_openbsd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/meminfo_openbsd.go b/collector/meminfo_openbsd.go index 93511ab9..4915c012 100644 --- a/collector/meminfo_openbsd.go +++ b/collector/meminfo_openbsd.go @@ -57,7 +57,7 @@ func (c *meminfoCollector) getMemInfo() (map[string]float64, error) { "inactive_bytes": ps * float64(uvmexp.inactive), "size_bytes": ps * float64(uvmexp.npages), "swap_size_bytes": ps * float64(uvmexp.swpages), - "swap_used_bytes": ps * float64(uvmexp.swpgonly), + "swap_used_bytes": ps * float64(uvmexp.swpginuse), "swapped_in_pages_bytes_total": ps * float64(uvmexp.pgswapin), "swapped_out_pages_bytes_total": ps * float64(uvmexp.pgswapout), "wired_bytes": ps * float64(uvmexp.wired),