Menu

#2595 [FreeBSD] regression in hrSystemProcesses

64-bit
open
None
5
2015-02-25
2015-01-29
No

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 to 5.7.2 fixes this problem.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197124

Discussion

  • Niels Baggesen

    Niels Baggesen - 2015-01-29

    Ah, yes, you are right. The hrSWRunTable now includes (kernel)threads, and that makes a big difference when it is used as the source for the system number of processes. It is now more like "ps auxH".

    This probably warrants a config option that defaults to the old behavior.

     
  • Niels Baggesen

    Niels Baggesen - 2015-01-29
    • assigned_to: Niels Baggesen
     
  • Niels Baggesen

    Niels Baggesen - 2015-02-12

    The attached patch should allow you to change the behavior back to the earlier release. Will that work for you?

     
    • Ryan Steinmetz

      Ryan Steinmetz - 2015-02-12

      Sounds good. Will you commit this to master as well?

      Thanks,
      -r

       
  • Niels Baggesen

    Niels Baggesen - 2015-02-12

    If you tell me it is OK :-)

     
    • Ryan Steinmetz

      Ryan Steinmetz - 2015-02-12

      Original submitter is reporting that the patch didn't do the trick. Any
      thoughts?

      Here's the email I received:

      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;

       
  • Lukasz Wasikowski

    I'm the original submitter, if I could provide any additional info don't hesitate to ask.

     
  • Niels Baggesen

    Niels Baggesen - 2015-02-17

    Silly oversight. This new patch should actually use the config parameter :(

    Please try that instead, and add "count_kthreads 0" in your snmpd.conf.

     
    • Ryan Steinmetz

      Ryan Steinmetz - 2015-02-17

      Shouldn't this default to off so that it mimics the behavior of the
      previous release?

      -r

       
      • Lukasz Wasikowski

        Now it works, thank you.

        BTW: I also think that count_kthreads 0 should be default.

         

        Last edit: Lukasz Wasikowski 2015-02-17
  • Niels Baggesen

    Niels Baggesen - 2015-02-25

    Yes and no. For Linux it has counted kernel threads for a long time, so the default should be OS dependent then :-(

    But you are probably right, I will update the patch

     

Log in to post a comment.