Date: Wed, 2 Jun 2010 09:16:58 -0700 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: Gustau =?iso-8859-1?Q?P=E9rez?= <gperez@entel.upc.edu>, Mikolaj Golub <to.my.trociny@gmail.com>, freebsd-stable@freebsd.org Subject: Re: bsnmpd returns incorrect hrProcessorLoad values Message-ID: <20100602161658.GA75243@icarus.home.lan> In-Reply-To: <20100602152721.GA3594@acme.spoerlein.net> References: <4B62C890.3020802@entel.upc.edu> <86ljfg7hl3.fsf@kopusha.onet> <4B69C572.1020601@entel.upc.edu> <20100602152721.GA3594@acme.spoerlein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <wait a while, then in another window> 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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100602161658.GA75243>