From owner-svn-src-head@FreeBSD.ORG Thu Nov 12 14:14:05 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78953106566C; Thu, 12 Nov 2009 14:14:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id EA4A88FC12; Thu, 12 Nov 2009 14:14:04 +0000 (UTC) Received: from besplex.bde.org (c220-239-235-116.carlnfd3.nsw.optusnet.com.au [220.239.235.116]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id nACEDK9D027323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Nov 2009 01:13:21 +1100 Date: Fri, 13 Nov 2009 01:13:20 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Peter Jeremy In-Reply-To: <20091112050515.GA15002@server.vk2pj.dyndns.org> Message-ID: <20091113010924.M1122@besplex.bde.org> References: <200911030928.nA39SjLx085597@svn.freebsd.org> <20091103214231.H23957@delplex.bde.org> <4AF4B6B2.3090706@delphij.net> <20091111230915.B3510@besplex.bde.org> <20091112050515.GA15002@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, d@delphij.net, svn-src-all@FreeBSD.org, Xin LI , Bruce Evans , svn-src-head@FreeBSD.org Subject: Re: svn commit: r198848 - head/bin/ps X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 14:14:05 -0000 On Thu, 12 Nov 2009, Peter Jeremy wrote: > On 2009-Nov-11 23:22:36 +1100, Bruce Evans wrote: >> On Fri, 6 Nov 2009, Xin LI wrote: >>> Will it sound reasonable to divide pcpu by ncpu and cap the number at 100? >> >> I don't like that. It would break scripts even more than units changes. >> It is hard for users to interpret too. Suddenly, processes taking >> 100% of 1 CPU would take 12.5% of 8 CPUs on a system with 8 CPUs, and >> different %CPU on systems with a different number of CPUs. > > Solaris does this. I found it particularly annoying for identifying > spinning, single-threaded processes - it's not as immediately obvious > that 1.6% CPU means a spinning process on a T5000, and the granularity > gets worse. We might eventually need an option for bug for bug compatibility with Solaris(Olaris?)/POSIX. A %cpu format could give the divided %CPU for anyone that wants it sooner. >> Just print %CPU in %4.0f format when it is >= 99.5 (or whatever rounds >> to 100.0). This works up to 999.5 %CPU. > > Actually, %4.0f works up to 9999.5 %CPU because there's no '.' in the > result. I think this is an excellent solution. And since FreeBSD > currently has a hard limit of 64 CPUs, it's unlikely to be exceeded > for a while. Oops. Bruce