From owner-freebsd-questions@FreeBSD.ORG Mon Oct 18 20:46:28 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75CFE1065672 for ; Mon, 18 Oct 2010 20:46:28 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forward4.mail.yandex.net (forward4.mail.yandex.net [77.88.46.9]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8A58FC1D for ; Mon, 18 Oct 2010 20:46:27 +0000 (UTC) Received: from smtp1.mail.yandex.net (smtp1.mail.yandex.net [77.88.46.101]) by forward4.mail.yandex.net (Yandex) with ESMTP id 383476AD83CA; Tue, 19 Oct 2010 00:46:26 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1287434786; bh=hO/fK2Z2QVEEfGMErKmHL95F8/7UuE3lfgyPTYyYsaY=; h=Date:From:Reply-To:Message-ID:To:CC:Subject:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nU6J4yQ/Zn96f9ApnPXjeKDUhdT7g6pBiT5d9W2GnMBknyYoqf4+4lDkjgN9Zvrl5 VwKY+MCm9D06nTuZ7hiig4GKO6G5JjxeMap+meAT0Cl4NWs+XhYMbWN3aOJyWdbfE0 ZWkLqCXpoJGiOPi0xJOe58m7HLiLRwpZ+uXZ5cX0= Received: from HOMEUSER (unknown [77.93.36.205]) by smtp1.mail.yandex.net (Yandex) with ESMTPA id C417B290080; Tue, 19 Oct 2010 00:46:25 +0400 (MSD) Date: Mon, 18 Oct 2010 23:46:30 +0300 From: =?utf-8?B?0JrQvtC90YzQutC+0LIg0JXQstCz0LXQvdC40Lk=?= X-Mailer: The Bat! (v4.0.24) Professional Organization: =?utf-8?B?0KfQnyDQmtC+0L3RjNC60L7QsiwgRnJlZUxpbmU=?= X-Priority: 3 (Normal) Message-ID: <1324871657.20101018234630@yandex.ru> To: Adam Vande More In-Reply-To: References: <20101015071719.1536f19e@mail.ose.nl> <4CBC97CB.80604@optiksecurite.com> <4CBCA8D1.5040005@optiksecurite.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable X-Yandex-TimeMark: 1287434786 X-Yandex-Spam: 1 X-Yandex-Front: smtp1.mail.yandex.net Cc: Martin Turgeon , Bas Smeelen , freebsd-questions@freebsd.org Subject: Re[2]: How is CPU usage calculated? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?utf-8?B?0JrQvtC90YzQutC+0LIg0JXQstCz0LXQvdC40Lk=?= List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 20:46:28 -0000 =C7=E4=F0=E0=E2=F1=F2=E2=F3=E9=F2=E5, Adam. =C2=FB =EF=E8=F1=E0=EB=E8 18 =EE=EA=F2=FF=E1=F0=FF 2010 =E3., 23:35:55: AVM> On Mon, Oct 18, 2010 at 3:06 PM, Martin Turgeon AVM> wrote: >> I just reread it and it isn't clearer what is using the CPU so much. Can >> you please give me a little more explanation? >> AVM> A line in top(1) like: AVM> CPU: 0.0% user, 0.0% nice, 0.4% system, 0.4% interrupt, 99.3% idle AVM> does not describe how much CPU is being used, but rather a "percentage= of AVM> time spent in each of the processor states". It's saying of the CPU c= ycles AVM> that are being used, this is what it breaks down as. Since MySQL is a AVM> userland application, you'd expect the value of user to be quite high = if AVM> that was only thing running on your system and it was under high load. AVM> You can infer how much CPU is being used from the line, but there are = better AVM> and more accurate methods generally of getting that information especi= ally AVM> with SMP systems. some times ago I was interested in this question also. From=20this explanations I undestand nothing. >>you'd expect the value of user to be quite high if that was only thing ru= nning on your system and it was under high load. 1. 'values of user' which value??? or value of what??? 2. 'quite high' how much it is? 3. 'high load' how I can detect that high load??? in man pages no usefull info except description of options. there are no examples how %idle system etc are calculated what is WCPU and CPU and how they are calculated NO EXAMPLES no example how find processes which take hole CPU time\ top is powerfull tool, but whiout docs it seems useless. that is sad --=20 =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC, =CA=EE=ED=FC=EA=EE=E2 mailto:kes-kes@yandex.ru