Is there an API to get the number of CPUs available in Linux? I mean, without using /proc/cpuinfo or any other sys-node file...
I\'ve found this implementation using
#include #include int main(int argc, char *argv[]) { printf("This system has %d processors configured and " "%d processors available.\n", get_nprocs_conf(), get_nprocs()); return 0; }
https://linux.die.net/man/3/get_nprocs