bsnmpd how to monitor only selected interfaces and jail-vnet interfaces

From: Özkan KIRIK <>
Date: Sun, 10 Oct 2021 05:00:00 UTC

I have a system that have too many (over 500 vlans) cloned interfaces
and two jails.
Jails are using vnet and they have their own physical interfaces.

Host Interfaces:
- em0 - WAN
- em1 - LAN
- em1.10 .... em1.550 (vlan interface)
- em2 - LAN2

Jail1 Interfaces:
- em3

Jail2 Interfaces:
- em4

I want to monitor only physical interfaces (em0, em1, em2, em3, em4)
by querying Host's bsnmpd.

But bsnmpd eats 100% of single core cpu (host resources and
enabled). Is there any way to configure the bsnmpd to monitory only
"em*" this interfaces and all jail's "em*" interfaces?
Is it possible to change behaviour to dont collect stats while idle,
collect only needed data when SNMP query received?

If you can give patches to fix, I can build and test it.

Have a nice day,