Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2008 08:33:42 -0800
From:      Jeremy Chadwick <koitsu@FreeBSD.org>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org, Fernando =?iso-8859-1?Q?Apestegu=EDa?= <fernando.apesteguia@gmail.com>
Subject:   Re: Porting from linux to FreeBSD (procfs question)
Message-ID:  <20080103163342.GA50642@eos.sc1.parodius.com>
In-Reply-To: <9bbcef730801030816y1c7b173cp65b60a9aefccd00a@mail.gmail.com>
References:  <1bd550a00801030514i5007c67t509e05f08c820dd@mail.gmail.com> <flip0s$du0$1@ger.gmane.org> <1bd550a00801030746y29b2c028j9351b99e8684f66c@mail.gmail.com> <9bbcef730801030816y1c7b173cp65b60a9aefccd00a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 03, 2008 at 05:16:42PM +0100, Ivan Voras wrote:
> On 03/01/2008, Fernando Apesteguía <fernando.apesteguia@gmail.com> 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 |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080103163342.GA50642>