From owner-freebsd-stable@FreeBSD.ORG Wed Jun 2 16:17:01 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 584A3106564A for ; Wed, 2 Jun 2010 16:17:01 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta02.westchester.pa.mail.comcast.net (qmta02.westchester.pa.mail.comcast.net [76.96.62.24]) by mx1.freebsd.org (Postfix) with ESMTP id 0434C8FC12 for ; Wed, 2 Jun 2010 16:17:00 +0000 (UTC) Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by qmta02.westchester.pa.mail.comcast.net with comcast id R0ez1e0080mv7h0524H1i8; Wed, 02 Jun 2010 16:17:01 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta11.westchester.pa.mail.comcast.net with comcast id R4Gz1e0093S48mS3X4H0Y7; Wed, 02 Jun 2010 16:17:01 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 261AA9B418; Wed, 2 Jun 2010 09:16:58 -0700 (PDT) Date: Wed, 2 Jun 2010 09:16:58 -0700 From: Jeremy Chadwick To: Gustau =?iso-8859-1?Q?P=E9rez?= , Mikolaj Golub , freebsd-stable@freebsd.org Message-ID: <20100602161658.GA75243@icarus.home.lan> References: <4B62C890.3020802@entel.upc.edu> <86ljfg7hl3.fsf@kopusha.onet> <4B69C572.1020601@entel.upc.edu> <20100602152721.GA3594@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100602152721.GA3594@acme.spoerlein.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: bsnmpd returns incorrect hrProcessorLoad values X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2010 16:17:01 -0000 On Wed, Jun 02, 2010 at 05:27:21PM +0200, Ulrich Spörlein wrote: > On Wed, 03.02.2010 at 19:50:26 +0100, Gustau Pérez wrote: > > En/na Mikolaj Golub ha escrit: > > > On Fri, 29 Jan 2010 12:37:52 +0100 Gustau Pérez wrote: > > > > > > > > >> Hi, > > >> > > >> I'm using cacti to monitor some servers running FBSD. I was using 7.2 > > >> with SCHED_4BSD. With this configuration : bsnmpd+bsnmp-ucd was > > >> returning right values for the cores' load. > > >> > > >> I recently updated the servers (via csup) to RELENG_8 and bsnmpd is > > >> returning negative values for the cores' load. If I try something like > > >> in a 4-core system : > > >> > > >> snmpwalk -v 2c -c community server .1.3.6.1.2.1.25.3.3.1 > > >> > > >> what I get is : > > >> > > >> .1.3.6.1.2.1.25.3.3.1.1.6 = OID: .0.0 > > >> .1.3.6.1.2.1.25.3.3.1.1.10 = OID: .0.0 > > >> .1.3.6.1.2.1.25.3.3.1.1.14 = OID: .0.0 > > >> .1.3.6.1.2.1.25.3.3.1.1.18 = OID: .0.0 > > >> .1.3.6.1.2.1.25.3.3.1.2.6 = INTEGER: -182 > > >> .1.3.6.1.2.1.25.3.3.1.2.10 = INTEGER: -182 > > >> .1.3.6.1.2.1.25.3.3.1.2.14 = INTEGER: -182 > > >> .1.3.6.1.2.1.25.3.3.1.2.18 = INTEGER: -182 > > Guys, > > can you please try the attached patch? I haven't yet tried it on an UP > system but it should mostly work. It is not finished though. When polling hrProcessorLoad for a RELENG_8 system (8.0-STABLE built April 26th) running bsnmpd, I don't see the behaviour the OP does. Instead, I see the values remain static. Example: r8host$ uptime 9:05am up 37 days, 6 hrs, 1 user, load averages: 0.00, 0.00, 0.00 r8host$ yes > /dev/null r8host$ top -b 2 last pid: 98721; load averages: 0.79, 0.28, 0.10 up 37+06:04:20 09:08:31 39 processes: 2 running, 37 sleeping Mem: 40M Active, 214M Inact, 5444M Wired, 192K Cache, 828M Buf, 2219M Free Swap: 32G Total, 32G Free PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 98715 jdc 1 118 0 5756K 1008K CPU2 2 1:03 100.00% yes 945 root 1 44 0 6840K 1292K select 3 514:21 0.00% powerd r8host$ sysctl hw.model hw.ncpu hw.model: Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz hw.ncpu: 4 box1$ snmpwalk -v2c -c community r8host hrProcessorLoad HOST-RESOURCES-MIB::hrProcessorLoad.5 = INTEGER: 100 HOST-RESOURCES-MIB::hrProcessorLoad.11 = INTEGER: 100 HOST-RESOURCES-MIB::hrProcessorLoad.17 = INTEGER: 100 HOST-RESOURCES-MIB::hrProcessorLoad.23 = INTEGER: 100 I found it to be more effective polling and graphing laLoadInt.1 (OID .1.3.6.1.4.1.2021.10.1.5.1), which is provided by bsnmp-ucd. There are some other problems I found with bsnmpd pertaining to pf counters (snmp_pf.so) not getting updated but only when querying SNMP in a specific manner (which works with other modules/MIBs). I reported the problem + full diagnosis + debug data to Philip Paeps, but he's quite busy right now. Not sure if someone wants to hear about it or not, but it's easy to reproduce. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |