tags:

views:

420

answers:

1

I would like to find the number of cpu sockets on OS X machines. This information is normally in the SMBIOS on pc's. Newer Intel Macs use EFI but I have read that the EFI does also contain an SMBIOS block.

I therefore appear to need access to the SMBIOS data block on power pc machines, and the EFI, SMBIOS section on Intel macs. Any suggestions would be appreciated.

A: 

I don't know any specific API for this (although there probably is one), but at the console, you can run this command and get the answer to be parsed out:

>system_profiler SPHardwareDataType
Peter Loron
Does not seem to include the number of cores in there.
Spacen Jasset
Hmm. Running that command on my MacBook correctly shows the number of processors (1) and the number of cores (2).
Peter Loron
Beg pardon, I meant cpu sockets. It does show the number of processors and cores.
Spacen Jasset
Ahhh. Yes, I suppose you could have unpopulated sockets.
Peter Loron