From owner-freebsd-stable@FreeBSD.ORG Mon Dec 7 16:20:32 2009 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 C66981065694 for ; Mon, 7 Dec 2009 16:20:32 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id 66FCB8FC19 for ; Mon, 7 Dec 2009 16:20:32 +0000 (UTC) Received: from localhost by koef.zs64.net (8.14.3/8.14.3) with ESMTP id nB7GKUJr073807 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 7 Dec 2009 17:20:30 +0100 (CET) (envelope-from stb@lassitu.de) (authenticated as stb) Message-Id: <2DC38FEA-65DA-410C-86A7-DE0BBF020333@lassitu.de> From: Stefan Bethke To: John Baldwin In-Reply-To: <200912071010.07886.jhb@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 7 Dec 2009 17:20:29 +0100 References: <68090C9C-89DB-4163-AEAE-4C1132742B04@lassitu.de> <200912071010.07886.jhb@freebsd.org> X-Mailer: Apple Mail (2.936) Cc: freebsd-stable@freebsd.org Subject: Re: vmstat and iostat us/sy/id numbers wrong? 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: Mon, 07 Dec 2009 16:20:32 -0000 Am 07.12.2009 um 16:10 schrieb John Baldwin: > On Saturday 05 December 2009 9:19:06 am Stefan Bethke wrote: >> I'm confused about the numbers shown in the last three columns in >> both > vmstat and iostat. They should reflect percent of CPU time spent on > user > processes, system threads, and the idle thread (or something like > that). >> >> On multiple machines running 8-stable from the last couple of days, >> the > numbers do not agree with actual system usage and with numbers shown > by top, > at all. I'm seeing 7 7 87 on one box, 0 0 100 on another, and 10 3 > 87 on a > third. The numbers stay the same even under different loads. >> >> Am I misunderstanding what those numbers should represent? > > Are you just running vmstat once or using 'vmstat 1' to have it > poll? If you > are running it once, note that the numbers vmstat report are the > percentage of > system/user/idle time since boot rather than during the previous > second which > is what top reports (and what 'vmstat 1' reports after the first > line). Thanks, I figured that out eventually (also by the nice help received from David Wolfskill). I'm now using "vmstat 30 2" and using the last line to get "current" numbers, instead of "vmstat 1". There seems to be some problem with the numbers though, as the since- boot output of vmstat does not seems to add up to 100%, at least in some cases. I'll see if I can find out more details later in the month. Stefan -- Stefan Bethke Fon +49 151 14070811