Compaq CPU ?
tamas at bazmag.hu
Tue Jan 11 02:50:09 PST 2005
> 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.
More information about the freebsd-smp