From owner-freebsd-current@FreeBSD.ORG Mon Oct 18 19:39:18 2010 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 736E4106564A for ; Mon, 18 Oct 2010 19:39:18 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 1CC618FC0A for ; Mon, 18 Oct 2010 19:39:17 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id o9IJdH30035435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Oct 2010 14:39:17 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id o9IJdGKF092311 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Oct 2010 14:39:17 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.4/Submit) id o9IJdGg7092310; Mon, 18 Oct 2010 14:39:16 -0500 (CDT) (envelope-from dan) Date: Mon, 18 Oct 2010 14:39:16 -0500 From: Dan Nelson To: Ed Maste Message-ID: <20101018193916.GD5644@dan.emsphone.com> References: <20101018174331.GA80017@sandvine.com> <20101018181142.GC5644@dan.emsphone.com> <20101018193010.GA88783@sandvine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101018193010.GA88783@sandvine.com> X-OS: FreeBSD 8.1-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.96.3 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Mon, 18 Oct 2010 14:39:17 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: freebsd-current@freebsd.org Subject: Re: CPU report in first line of "vmstat 1" is meaningless 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: Mon, 18 Oct 2010 19:39:18 -0000 In the last episode (Oct 18), Ed Maste said: > On Mon, Oct 18, 2010 at 01:11:42PM -0500, Dan Nelson wrote: > > Maybe only blank it out on 32-bit machines? It's a long, and a 64-bit > > cp_time value essentially won't roll over (at 1 billion increments per > > second it will roll over in 500 years; we currently increment 133 times > > per second, I think). If the value can be calculated accurately, it > > should be printed. > > Well, it won't roll over, but it's still different from all following > lines (in that it effectively shows user/system/idle CPU usage since boot > on the first line, and a snapshot over the last interval from then on). I > think it's still better to avoid printing it in that case. It is documented to do that, though, and could affect scripts that expect to see average-since-boot info on the first line. iostat does the same, btw. > On a related note I'm not sure if it makes sense to have the same > behaviour for the first line when an interval is set as when it is > invoked with no interval. -- Dan Nelson dnelson@allantgroup.com