On Linux, how to tell how many cores of the machine are active? I assume a test for this would work for Android too. I need to know if more than one core is ever active. Was wondering to test this by having a process create many threads. Is it possible for a thread to query which processor it is on? that way one can tell if multiple cores will ever be used under heavy load. Not sure if I am on the right track.
feedback
|
migrated from stackoverflow.com Jan 25 '11 at 3:17
This question came from our site for professional and enthusiast programmers.
|
You can use You can also add a column that shows the last-used core for each process. Press f to bring up the field list, then j to activate the "P" column. Then press space to return to the live view. | |||||||||||||
feedback
|
|
So you could use something like:
Note that merely running Probably better is to run this:
that way the | |||||||||||
feedback
|
|
| |||||
feedback
|