The node of interest
The value of cpu usage below which the CPU will be considered idle.
beostat_count_idle_cpus_on_node will count the number of CPUs on a given node that have CPU usage below a given threshold.
int cnt; cnt = beostat_count_idle_cpus_on_node (3, 0.5); printf ("Node 3 has %d CPUs below 50% usage.\n", cnt);
Returns the number of CPUs on the give node that have usage below the threshold. If an error occurs it will return -1.
This function relies on the Beostat subsystem, which consists of the proc filesystem on the remote node, the sendstatsdaemon on the remote node, the recvstats daemon on the master node, and two shared memory files in the directory /var/shm. If any part of the system breaks down, this function could fail.