Emacs 24.3 Lisp does not have access to this information. Your options would seem to include:
- An Elisp library entry that uses the SYSTEM-TYPE value to select a system method for counting the number of processors;
- Emacs C , , Emacs, Lisp.
, , . , :
- system-cores.el,
(system-cores :physical), , (system-cores :logical) (system-cores), alist, .
:
- PROCESS-LINES. , SYSTEM-CORES, SYSTEM-CORES . (, ,
(getenv "PATH") /usr/sbin, PROCESS-LINES " : , system_profiler".) , GNU/Linux (- /proc/cpuinfo, ), Windows NT ( , 2000, XP ) Darwin (OS X, 10,8, 10.2). , , .
, , , BSD, BSD, , , - - , sysctls, SYSTEM-CORES-SYSCTL.
Linux, Windows OS X, ! , . , , , . , , :
- , .
M-: system-type EmacsM-: system-configuration Emacs
.
: :cores :processors :physical :logical ; , , - .
: @lunaryorn, (split-string (shell-command-to-string ...)) (process-lines ...). , , , .