This has been sorely needed for a while. I have added a sysctl oid for every zone. Here is an example:

vm.uma.RADIX_NODE.stats.xdomain: 0

vm.uma.RADIX_NODE.stats.fails: 0

vm.uma.RADIX_NODE.stats.frees: 3404547

vm.uma.RADIX_NODE.stats.allocs: 3488279

vm.uma.RADIX_NODE.stats.current: 75216

vm.uma.RADIX_NODE.domain.0.wss: 233

vm.uma.RADIX_NODE.domain.0.imin: 22011

vm.uma.RADIX_NODE.domain.0.imax: 22011

vm.uma.RADIX_NODE.domain.0.nitems: 22011

vm.uma.RADIX_NODE.limit.sleeps: 0

vm.uma.RADIX_NODE.limit.sleepers: 0

vm.uma.RADIX_NODE.limit.max_items: 0

vm.uma.RADIX_NODE.limit.items: 0

vm.uma.RADIX_NODE.keg.free: 8

vm.uma.RADIX_NODE.keg.pages: 3925

vm.uma.RADIX_NODE.keg.align: 1

vm.uma.RADIX_NODE.keg.ipers: 27

vm.uma.RADIX_NODE.keg.ppera: 1

vm.uma.RADIX_NODE.keg.rsize: 144

vm.uma.RADIX_NODE.keg.name: RADIX NODE

vm.uma.RADIX_NODE.count_max: 253

vm.uma.RADIX_NODE.count: 203

vm.uma.RADIX_NODE.flags: 2147745792

vm.uma.RADIX_NODE.size: 144

Here's the keg portion of z ZSECOND zone

vm.uma.mbuf_packet.keg.free: 1

vm.uma.mbuf_packet.keg.pages: 1906

vm.uma.mbuf_packet.keg.align: 255

vm.uma.mbuf_packet.keg.ipers: 15

vm.uma.mbuf_packet.keg.ppera: 1

vm.uma.mbuf_packet.keg.rsize: 256

vm.uma.mbuf_packet.keg.name: mbuf

Both mbuf and mbuf_packet will print the same stats for the "mbuf" keg.

I had to preprocess and dup the name because we make zones with duplicate names and use illegal characters for sysctl. This means that it is really a human targeted interface.

I have not yet added any writable controls. Presumably you could update limit policies, bucket sizes, or whatever you like for experimentation. I also think we need some more stats. At one point I had counters for fast path vs slow path allocs etc.