[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detect number of cpus
From: |
Michael Goffioul |
Subject: |
Re: Detect number of cpus |
Date: |
Wed, 23 Jan 2008 20:05:13 +0100 |
On 1/23/08, Fredrik Lingvall <address@hidden> wrote:
> On a Linux box one can do, for example,
>
> [dummy,tmp_str]= system('cat /proc/cpuinfo | grep model | grep name');
> n_cpus = size(strfind(tmp_str,'model'),2);
>
> to detect the number of CPUs/Cores on the system. Is is possible to do
> something similar on Windows?
You can find CPU information in the registry:
HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\X
where 'X' is the processor number. The Windows package from octave-forge
provides functions to accessthe registry.
Michael.