From owner-freebsd-smp@FreeBSD.ORG Tue Jan 11 10:50:09 2005 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FC2816A4CE for ; Tue, 11 Jan 2005 10:50:09 +0000 (GMT) Received: from lists.sch.bme.hu (kaa.sch.bme.hu [152.66.208.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id C451643D5C for ; Tue, 11 Jan 2005 10:50:05 +0000 (GMT) (envelope-from tamas@bazmag.hu) Received: by lists.sch.bme.hu (Postfix, from userid 102) id 22BD4858E19; Tue, 11 Jan 2005 11:50:04 +0100 (CET) Received: from [152.66.211.76] (ural14.sch.bme.hu [152.66.211.76]) by lists.sch.bme.hu (Postfix) with ESMTP id 13CF7858DAA; Tue, 11 Jan 2005 11:50:04 +0100 (CET) Message-ID: <41E3AF7C.1070601@bazmag.hu> Date: Tue, 11 Jan 2005 11:50:36 +0100 From: Tamas MEZEI User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Frank Bonnet References: <41E3A0FA.80006@esiee.fr> In-Reply-To: <41E3A0FA.80006@esiee.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-smp@freebsd.org Subject: Re: Compaq CPU ? X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2005 10:50:09 -0000 > when I perform the "top" command it seems to have two, but ... There's one way to check the most recent dmesg.boot: cat /var/run/dmesg.boot | grep cpu but I guess if you have N CPUs and HT is turned on you'll see 2N CPUs as a result, so if you don't want to check sysctl values just read the first some lines from dmesg.boot. It should tell that if hyperthreading is used or not. If so, you'll se something like "Hyperthreading: %d logical CPUs" at the CPU info section, and when you grep dmesg.boot for 'cpu', you'll get [cpu0..cpu(N-1)] and this is twice as many as the number of CPUs you have. If you use HT (there's no HTT field in the Features list), and you grep for 'cpu', you'll get the real amount of CPUs you have. Or, you could grab this whole stuff from sysctl, but maybe fussing with finding the value which tells you the truth is way slower than just reading some five lines of text. Good luck, Tamas Tamas