From 293544a75150e23152a52b65b53b009fd917127b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Charlier?= Date: Fri, 14 Jan 2022 17:37:13 +0100 Subject: [PATCH] memory_bsd: add user_wired_bytes & laundry_bytes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These two memory classes have been here for a while now in FreeBSD, adding them allows having information for all memory classes. Signed-off-by: François Charlier --- collector/memory_bsd.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/collector/memory_bsd.go b/collector/memory_bsd.go index 5b312691e9..3039e6df89 100644 --- a/collector/memory_bsd.go +++ b/collector/memory_bsd.go @@ -82,6 +82,12 @@ func NewMemoryCollector(logger log.Logger) (Collector, error) { mib: "vm.stats.vm.v_wire_count", conversion: fromPage, }, + { + name: "user_wired_bytes", + description: "Locked in memory by user, mlock, etc", + mib: "vm.stats.vm.v_user_wire_count", + conversion: fromPage, + }, { name: "cache_bytes", description: "Almost free, backed by swap or files, available for re-allocation", @@ -100,6 +106,12 @@ func NewMemoryCollector(logger log.Logger) (Collector, error) { mib: "vm.stats.vm.v_free_count", conversion: fromPage, }, + { + name: "laundry_bytes", + description: "Dirty not recently used by userland", + mib: "vm.stats.vm.v_laundry_count", + conversion: fromPage, + }, { name: "size_bytes", description: "Total physical memory size",