Tested on FreeBSD 10.1 and 9.3. net-snmp-5.7.2_16 works fine, show real process number (checked with top and ps): /usr/local/libexec/nagios/check_snmp -P 2c -o .1.3.6.1.2.1.25.1.6.0 -H edited -C edited -w 300 -c 350 SNMP OK - 115 | iso.3.6.1.2.1.25.1.6.0=115;300;350; After update to net-snmp-5.7.3_1 top and ps still show ca. 115 processes, but snmpd says different: /usr/local/libexec/nagios/check_snmp -P 2c -o .1.3.6.1.2.1.25.1.6.0 -H edited -C edited -w 300 -c 350 SNMP CRITICAL - *429* | iso.3.6.1.2.1.25.1.6.0=429;300;350; Downgrade fixes this problem.
Auto-assigned to maintainer zi@FreeBSD.org
Upstream bug opened: https://sourceforge.net/p/net-snmp/bugs/2595/
Fix committed.
A commit references this bug: Author: zi Date: Thu Feb 12 19:50:35 UTC 2015 New revision: 378886 URL: https://svnweb.freebsd.org/changeset/ports/378886 Log: - Fix hrSystemProcesses regression - Bump PORTREVISION PR: 197124 Submitted by: Lukasz Wasikowski <lukasz@wasikowski.net> Obtained from: upstream: https://sourceforge.net/p/net-snmp/bugs/2595/ Changes: head/net-mgmt/net-snmp/Makefile head/net-mgmt/net-snmp/files/patch-kthreads
I don't think that patch fixed the problem. # pkg info -o net-snmp net-snmp-5.7.3_3 net-mgmt/net-snmp # ps auxfw | wc -l 285 # /usr/local/libexec/nagios/check_snmp -P 2c -o .1.3.6.1.2.1.25.1.6.0 -H edited -C edited -w 300 -c 350 SNMP CRITICAL - *814* | iso.3.6.1.2.1.25.1.6.0=814;300;350;
Updated patch applied that fixes this. Please update to 5.7.3_4. You can restore the 'current' (broken) behavior by adding the following to your snmpd.conf: count_kthreads 1