memory_bsd: add user_wired_bytes & laundry_bytes

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 <fcharlier@ploup.net>
This commit is contained in:
François Charlier 2022-01-14 17:37:13 +01:00 committed by Johannes 'fish' Ziemke
parent d31cfb6ef9
commit 5a2c83d0f9

View File

@ -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",