Solved

Finding cores in cpu

Posted on 2013-06-14
2
161 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Way to decrease size of apk file 9 86
Java exception bubble up 2 21
Is there a simpler dropbox system? 10 34
Fast way to search item into Java Array (Rhino compatible) 2 31
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

861 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