Bug 197124 - [regression] net-mgmt/net-snmp shows wrong value for hrSystemProcesses
Summary: [regression] net-mgmt/net-snmp shows wrong value for hrSystemProcesses
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 13:50 UTC by Lukasz Wasikowski
Modified: 2015-02-17 20:51 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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