Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Dec 2004 13:56:53 +0100
From:      Attila Nagy <bra@fsn.hu>
To:        hackers@freebsd.org
Subject:   Virtual CPU or not?
Message-ID:  <41C42915.4080104@fsn.hu>

next in thread | raw e-mail | index | archive | help
Hello,

I would like to find a method which determines the current number of 
active CPUs.

The problem is that neither hw.ncpu nor kern.smp.cpus contain the right 
value if machdep.hlt_logical_cpus is 1.

Is there a better method than checking that sysctl and divide the 
hw.ncpu by two if set?

Thanks,
-- 
Attila Nagy                                   e-mail: Attila.Nagy@fsn.hu
Adopt a directory on our free software   phone @work: +361 371 3536
server! http://www.fsn.hu/?f=brick             cell.: +3630 306 6758



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