From owner-freebsd-stable@FreeBSD.ORG Fri Oct 3 09:39:39 2008 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 156F4106569C for ; Fri, 3 Oct 2008 09:39:39 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from chen.org.nz (ip-58-28-152-174.static-xdsl.xnet.co.nz [58.28.152.174]) by mx1.freebsd.org (Postfix) with ESMTP id AC1198FC20 for ; Fri, 3 Oct 2008 09:39:38 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: by chen.org.nz (Postfix, from userid 1000) id 245E128418; Fri, 3 Oct 2008 22:39:37 +1300 (NZDT) Date: Fri, 3 Oct 2008 22:39:37 +1300 From: Jonathan Chen To: Stefan Ehmann Message-ID: <20081003093937.GA4944@osiris.chen.org.nz> References: <200810031003.14400.shoesoft@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200810031003.14400.shoesoft@gmx.net> User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@freebsd.org Subject: Re: top/ps CPU percentage broken on 7.1-PRERELEASE? 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: Fri, 03 Oct 2008 09:39:39 -0000 On Fri, Oct 03, 2008 at 10:03:13AM +0200, Stefan Ehmann wrote: > The CPU % displayed by top/ps for single processes seem to be broken here. > > E.g. for a simple shell loop: > top starts displaying around 20% for bash. Within some seconds it converges to > 0%. > > ps values seem to be consistent with top. > > The value in the time column seems to be correct. On every refresh it > increases by 2s. > > last pid: 19353; load averages: 0.99, 0.90, 0.76 up 0+00:37:29 > 09:07:00 > 119 processes: 2 running, 114 sleeping, 1 stopped, 2 zombie > CPU: 98.5% user, 0.0% nice, 1.1% system, 0.4% interrupt, 0.0% idle > Mem: 376M Active, 407M Inact, 144M Wired, 47M Cache, 110M Buf, 13M Free > Swap: 1280M Total, 1280M Free > > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > 19352 stefan 1 99 0 4432K 2080K RUN 0:03 15.48% bash > > All other process are using 0% CPU. > > I did a buildworld/kernel yesterday to be sure everything is in sync. I have > CURRENT on a different hard disk. Haven't seen the problem there. > Are there any relevant fixes that weren't MFCed? > > Does anyone else see this? This is a single CPU i386 machine. Yes, my Java processes now run at 800% at times on my dual processor AMD64 system. -- Jonathan Chen ---------------------------------------------------------------------- The Internet: an empirical test of the idea that a million monkeys banging on a million keyboards can produce Shakespeare