From owner-freebsd-questions@FreeBSD.ORG Thu Jan 3 16:33:43 2008 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 316B416A46B; Thu, 3 Jan 2008 16:33:43 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 1AB7013C4D5; Thu, 3 Jan 2008 16:33:42 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id E12EF1CC038; Thu, 3 Jan 2008 08:33:42 -0800 (PST) Date: Thu, 3 Jan 2008 08:33:42 -0800 From: Jeremy Chadwick To: Ivan Voras Message-ID: <20080103163342.GA50642@eos.sc1.parodius.com> References: <1bd550a00801030514i5007c67t509e05f08c820dd@mail.gmail.com> <1bd550a00801030746y29b2c028j9351b99e8684f66c@mail.gmail.com> <9bbcef730801030816y1c7b173cp65b60a9aefccd00a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9bbcef730801030816y1c7b173cp65b60a9aefccd00a@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org, Fernando =?iso-8859-1?Q?Apestegu=EDa?= Subject: Re: Porting from linux to FreeBSD (procfs question) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 16:33:43 -0000 On Thu, Jan 03, 2008 at 05:16:42PM +0100, Ivan Voras wrote: > On 03/01/2008, Fernando Apesteguía wrote: > > > Yes, that's my problem. In Linux I can get from /proc/cpuinfo for > > example: name, model, stepping, cache size, clock speed, supported > > extensions, etc... > > But using sysctl in FreeBSD (sysctl -a) I can only see name and vendor > > for the cpu and a few more things. Am I limited to the variables > > showed in sysctl -a? > > Probably. I don't know if there's anything that can give you the > details present in cpuinfo (except using CPUID data directly). Best bet is parsing or using the hw.model sysctl, or if you need lower-level information, there is a port that apparently gets cache size and other data. There are very few things I liked about Linux /proc when I used it, but getting h/w information happened to be one of them... -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |