Bug 197124

Summary: [regression] net-mgmt/net-snmp shows wrong value for hrSystemProcesses
Product: Ports & Packages Reporter: Lukasz Wasikowski <lukasz>
Component: Individual Port(s)Assignee: Ryan Steinmetz <zi>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (zi)
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   

Description Lukasz Wasikowski 2015-01-27 13:50:06 UTC
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.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-27 13:50:06 UTC
Auto-assigned to maintainer zi@FreeBSD.org
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2015-01-29 01:54:30 UTC
Upstream bug opened: https://sourceforge.net/p/net-snmp/bugs/2595/
Comment 3 Ryan Steinmetz freebsd_committer freebsd_triage 2015-02-12 19:50:42 UTC
Fix committed.
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-02-12 19:51:17 UTC
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
Comment 5 Lukasz Wasikowski 2015-02-12 21:48:49 UTC
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;
Comment 6 Ryan Steinmetz freebsd_committer freebsd_triage 2015-02-17 20:51:09 UTC
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