Number of CPU Cores
Example of the Java code for obtaining the number of available processors:
public class SystemProperty {
public static void main(String args[]) {
int availProcessors = Runtime.getRuntime().availableProcessors();
System.out.println("avail processors count: " + availProcessors);
}
Execution result on the Kunpeng platform:
[root@centos7 test]# Java SystemProperty avail processors count: 16
Parent topic: Java