Solved

Finding cores in cpu

Posted on 2013-06-14
2
160 Views
Last Modified: 2013-10-16
hi experts

Is ther any way to find out the number of cores in a CPU in java ?
Runtime.getRuntime().availableProcessors() will give the number of cpus

How do i know how many cores does each cpu have ?

thanks
0
Comment
Question by:royjayd
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 39248928
0
 

Author Comment

by:royjayd
ID: 39248963
that question talks about number of processors, this one asks about cores in a processor

currently i am running 4 processors
(i see that using : Runtime.getRuntime().availableProcessors()  )

but each processor has 6 cores
In my unix box
 $cat /proc/cpuinfo

cpu family      : 6     -- number of cores

Is there a way in java to see that ?

thx
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 85
allswap challenge 6 99
micro services spring boot application error 3 194
Spring Framework HTTPSession management 1 36
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question