Subject: | Mac OSX- displays wrong cpu count |
On a MacBook with Core 2 Duo the following code:
use Unix::Processors;
my $procs = Unix::Processors->new;
printf "%s %s\n", $procs->max_online, $procs->max_physical;
# returns: 1 1
But it should return: 2 2
Show quoted text
> sysctl -a | grep cpu | grep core
machdep.cpu.cores_per_package: 2
machdep.cpu.core_count: 2
Show quoted text> uname -a
Darwin coredump.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3
10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386
MacBook2,1 Darwin