Cores on a node

classic Classic list List threaded Threaded
2 messages Options
F.D. F.D.
Reply | Threaded
Open this post in threaded view
|

Cores on a node

Hi,
I'd like to know if is possible to know the number of logical/physical cores on a node in a cluster?

Thanks,
   F.D.
Mikael Mikael
Reply | Threaded
Open this post in threaded view
|

Re: Cores on a node

Hi!

int numCores = Runtime.getRuntime().availableProcessors();

It will return an ok value, it may not return the actual number of cores
depending on affinity settings and things like that, but it will return
the cores that JVM have access to.

Mikael

Den 2020-02-09 kl. 12:44, skrev F.D.:
> Hi,
> I'd like to know if is possible to know the number of logical/physical
> cores on a node in a cluster?
>
> Thanks,
>    F.D.