From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 27 12:04:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 447C71065670 for ; Sat, 27 Dec 2008 12:04:34 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.191]) by mx1.freebsd.org (Postfix) with ESMTP id BD83F8FC0C for ; Sat, 27 Dec 2008 12:04:33 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so2007773mue.3 for ; Sat, 27 Dec 2008 04:04:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=RYUIvDVDTAVSgOyCsSkS+Xu+6AaRKiP/x3l/u0FbieE=; b=F9CbOymE5hcsNTOkGixmg6UB8b1TPaUGB954+i3sziMDtTvfW91qt3iBvz3IA6UVRH T/HCf+IBPNe+RZjSti93Tzb7Q3oTwPJ00M6uaDnDHFxWa8P2sgUXq8bkMOFBQx0sJFJo oZHphHh499Nh/W4AMZkxtxcuUjHlWd2z7RkEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=u1CmSGtCpQqK6Vad5FrR7/ef5RMUhSq7HFZZkVRZdAqVZyDjl1w8y2bYxXIy3S6fSx /eLv/maMk6Udj9ndh86vY/Jcz+RF4mTHGjSSjiFN5SmRtCbcKYubSGgXb9HEyeFLhnFy FAP4kFHc1fNOjN3m3vfOP4aG+6oNI15isd1do= Received: by 10.103.40.5 with SMTP id s5mr4193819muj.4.1230379472460; Sat, 27 Dec 2008 04:04:32 -0800 (PST) Received: from nslpc5.epfl.ch (nslpc5.epfl.ch [128.178.149.20]) by mx.google.com with ESMTPS id i5sm13670234mue.46.2008.12.27.04.04.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Dec 2008 04:04:31 -0800 (PST) Message-Id: <13986D39-BE78-4CB4-A1E5-83F0382915AC@gmail.com> From: =?ISO-8859-2?Q?Nikola_Kne=BEevi=E6?= To: freebsd-hackers@freebsd.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Sat, 27 Dec 2008 13:04:30 +0100 References: <7555893E-5D2F-4C3C-A1C7-7BCC2461AE23@gmail.com> X-Mailer: Apple Mail (2.930.3) Subject: Re: ps not showing CPU# correctly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 12:04:34 -0000 On 27 Dec 2008, at 02:30 , Mateusz Guzik wrote: >> on my system, I noticed that ps(1) is not showing the CPU# >> correctly (it >> always displays 0). There was a bug in it, and it was fetching >> ki_estcpu >> instead of ki_lastcpu. >> > > From the man page: > cpu short-term CPU usage factor (for scheduling) > > Apparently not last cpu's number. :) You're probably using SCHED_ULE - > this scheduler does not alter td_estcpu and that's why ps -o cpu gives > you only 0. Ups :) I got mislead with top showing the cpu on which process executes. I find the information on which cpu is process/thread executed quite useful for performance debugging. Maybe I should add it to ps as cpu# or cpuno or cpuid? Cheers, Nikola