From owner-freebsd-current@FreeBSD.ORG Tue May 20 18:45:06 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CC1D1065670 for ; Tue, 20 May 2008 18:45:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2EA988FC2C for ; Tue, 20 May 2008 18:45:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id ABDDE41C7A4; Tue, 20 May 2008 20:45:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id NwuVRu39rLdl; Tue, 20 May 2008 20:45:03 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 490E741C799; Tue, 20 May 2008 20:45:03 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id E023044487F; Tue, 20 May 2008 18:44:20 +0000 (UTC) Date: Tue, 20 May 2008 18:44:20 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Michael Proto In-Reply-To: <4832216F.9030606@jellydonut.org> Message-ID: <20080520184228.O47338@maildrop.int.zabbadoz.net> References: <4820FE0F.9050808@jellydonut.org> <200805070149.m471nToM073813@lava.sentex.ca> <482121B1.7080901@jellydonut.org> <20080507085035.L9490@beagle.kn.op.dlr.de> <20080507103247.GA84958@unknown.211.ru> <4832216F.9030606@jellydonut.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Jeff Roberson , freebsd-current@freebsd.org, Stanislav A Svirid Subject: Re: bsnmpd hrProcessorLoad results incorrect on FreeBSD 7 or 8? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2008 18:45:06 -0000 On Mon, 19 May 2008, Michael Proto wrote: Hi, > Stanislav A Svirid wrote: >> On Wed 07 May, 2008, Harti Brandt wrote: >> >>> On Tue, 6 May 2008, Michael Proto wrote: >>> >>> MP>Mike Tancsa wrote: >>> MP>> At 08:55 PM 5/6/2008, Michael Proto wrote: >>> MP>> > Is anyone seeing problems with bsnmpd reporting an incorrect >>> MP>> > HOST-RESOURCES-MIB::hrProcessorLoad value under HEAD? I'm using the >>> MP>> > default /etc/snmpd.config settings and am loading the >>> MP>> > /usr/lib/snmp_hostres.so library just as I do in 6.3, but the value >>> for >>> MP>> > this MIB always reports CPU utilization at 100% regardless of the >>> actual >>> MP>> > load on the system. 6.3 and 6-STABLE both work correctly and report >>> the >>> MP>> > actual CPU utilization when queried. >>> MP>> >>> MP>> IIRC, I noticed this when I changed to ULE from 4BSD_SCHED. >>> MP>> >>> MP>> ---Mike >>> MP>> _______________________________________________ >>> MP>> freebsd-current@freebsd.org mailing list >>> MP>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>> MP>> To unsubscribe, send any mail to >>> "freebsd-current-unsubscribe@freebsd.org" >>> MP> >>> MP>Would match my environment as well, as I'm using ULE on all of the >>> MP>affected systems. Just built a 4BSD kernel on my HEAD system and >>> MP>HOST-RESOURCES-MIB::hrProcessorLoad reports a correct value again. >>> MP> >>> MP>Anyone have an idea on a fix? >>> >>> If anybody has a fix that works with both schedulers, I happily commit >>> this. >> >> Here you are :) >> >> --- hostres_processor_tbl.c.old 2008-05-07 17:23:47.000000000 +0700 >> +++ hostres_processor_tbl.c 2008-05-07 17:23:54.000000000 +0700 >> @@ -120,7 +120,7 @@ static double >> processor_getpcpu(struct kinfo_proc *ki_p) >> { >> >> - if (ccpu == 0 || fscale == 0) >> + if (fscale == 0) >> return (0.0); >> >> #define fxtofl(fixpt) ((double)(fixpt) / fscale) >> > > > This worked (sorta). On my PCEngines ALIX platform CPU utilization on > HEAD dropped down to 0-2% from a constant 100%. It looks slightly > incorrect though, as there is 3-4% interrupt load at all times on that > system (as per top and vmstat). Still a much better representation than > before though. > > So is this fix facetious and I'm not seeing it due to my lack of C prowess? there are further problems. I talked with Jeffr about this and forwarded him the details. As we all have been in transit the last days/... give him a few more days. /bz -- Bjoern A. Zeeb Stop bit received. Insert coin for new game.