[erlang-questions] logical_processors_available unknown on mac

Richard A. O'Keefe ok@REDACTED
Fri Feb 19 01:40:00 CET 2016

On 19/02/16 12:42 pm, Alin Popa wrote:
> Yeah, I know there are some sysctl OSX flags that can be looked up, 
> the thing that I don't know if those are the same as those used on the 
> Linux (or other?) implementations.
I just checked two different boxes running two different versions of Linux.
Both had the sysctl program.  Neither had sysctl(3) in the library part of
the manual.  Both included the sysctl() function but not the sysctlbyname()
function.  Neither of them reported ANY 'hw' or 'cpu' properties.

sysctl was added to the BSDs after Solaris engulfed System V, so Solaris
lacks it. https://www.gnu.org/software/gnulib/manual/html_node/sysctl.html
says of sysctl() that
     This function is missing on some platforms: Minix 3.1.8, AIX 5.1, 
HP-UX 11,
     IRIX 5.3, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9,
     Interix 3.5, BeOS
which is a long-winded way of saying "BSD and Linux only".

I thought an Apple-specific answer to an Apple-specific issue might be 

By the way, it *used* to be possible to turn cores on and off in Mac OS X.
There used to be a program 'CPUPalette.app' and later it was possible to
do it with 'Instruments'.

More information about the erlang-questions mailing list