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.
This commit is contained in:
Ralf Horstmann 2018-02-16 11:34:41 +01:00 committed by Ben Kochie
parent f6965e1812
commit 8d9c7ca659

View file

@ -57,7 +57,7 @@ func (c *meminfoCollector) getMemInfo() (map[string]float64, error) {
"inactive_bytes": ps * float64(uvmexp.inactive), "inactive_bytes": ps * float64(uvmexp.inactive),
"size_bytes": ps * float64(uvmexp.npages), "size_bytes": ps * float64(uvmexp.npages),
"swap_size_bytes": ps * float64(uvmexp.swpages), "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_in_pages_bytes_total": ps * float64(uvmexp.pgswapin),
"swapped_out_pages_bytes_total": ps * float64(uvmexp.pgswapout), "swapped_out_pages_bytes_total": ps * float64(uvmexp.pgswapout),
"wired_bytes": ps * float64(uvmexp.wired), "wired_bytes": ps * float64(uvmexp.wired),