Created attachment 219637 [details]
Add back patch-agent_mibgroup_hardware_memory_memory__freebsd.c.
In the upgrade from 5.7.3 to 5.9, the following MIB patch was removed: patch-agent_mibgroup_hardware_memory_memory__freebsd.c.
This patch is, unfortunately, still necessary to correctly instrument "used" and "free" memory via SNMP under FreeBSD, since "inactive" memory needs to be reported along with "cache" in the "UCD-SNMP-MIB::memCached" OID. This change was never upstreamed to net-snmp.
This issue is a repeat of the old PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=148339
I've attached a patch that includes the old patch, which still applies cleanly.
As an aside, I'm not sure if "Laundry" memory needs to be reported in this MIB or not as well? Can someone with more insight comment on this? Currently I am using (memTotalReal - memAvailReal - memCached) to instrument "used" memory via SNMP.
Here is a related request to the net-snmp project.
Can you open a PR with the devs and include your patch so it gets upstreamed?
Yeah, I just opened PR with the patch.
A commit references this bug:
Date: Sun Nov 15 16:27:34 UTC 2020
New revision: 555237
- Add memory calculation fix
- Bump PORTREVISION
Submitted by: firstname.lastname@example.org
Thank you. net-snmp also accepted the patch upstream, so the patch file can be safely removed the next time the port is upgraded.