Date: Tue, 19 Oct 2010 00:13:20 +0000 From: Alexander Best <arundel@freebsd.org> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-current@freebsd.org, Ed Maste <emaste@freebsd.org> Subject: Re: CPU report in first line of "vmstat 1" is meaningless Message-ID: <20101019001320.GB91234@freebsd.org> In-Reply-To: <20101018193916.GD5644@dan.emsphone.com> References: <20101018174331.GA80017@sandvine.com> <20101018181142.GC5644@dan.emsphone.com> <20101018193010.GA88783@sandvine.com> <20101018193916.GD5644@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon Oct 18 10, Dan Nelson wrote: > 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. ...also vmstat seems to exist in a few other OSes (linux e.g). maybe they've fixed it already (or the netbsd/openbsd/dragonflybsd folks or apple?). cheers. alex > > -- > Dan Nelson > dnelson@allantgroup.com -- a13x
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101019001320.GB91234>