Yes, both SUN JRE and DRLVM returns 1 for me. Java API has the same problem. :-) Probably it should introduce an availableCoresPerProcessor() or something more comprehensive.
Thanks, xiaofeng On 11/1/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote:
On 11/1/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote: > > Are you using Linux? Don't know why it doesn't work for my Pentium D. > Actually my Windows seems not show two processors at first, while the > API may depend on OS. My Linux has no problem with this. > > On the other hand, even your case is undesirable for Hyperthreading > since we probably want more detailed info about processor(s) since > hyperthreading sometimes wants to be treated differently than real SMP > (or dual-core). I believe there is such kind of API available > somewhere, at least NUMA support of Linux from SGI has it. > I use WindowsXP and here is more detailed info about CPU: Number of processors 1 Number of cores 1 per processor Number of threads 2 (max 2) per processor Name Intel Pentium 4 660 Code Name Prescott Specification Intel(R) Pentium(R) 4 CPU 3.60GHz Package Socket 775 LGA And I see 2 CPUs in Windows Task Manager. Did you tried Runtime.getRuntime().availableProcessors() ? -- Mikhail Fursov