beostat_get_cpu_count¶
Name¶
beostat_get_cpu_count – return the number of CPUs on the specified node
Synopsis¶
#include <sys/beostat.h>
int beostat_get_cpu_count (int node, size_t *ncpus);
Arguments¶
node
The node to query.
ncpus
A pointer to a
size_t
, which upon successful completion will contain the number of CPUs on the node specified by thenode
parameter.
Description¶
beostat_get_cpu_count
executes on the master node and returns the
number of CPUs on a specified compute node. A CPU count of zero means
that the node
’s sendstats
daemon is not executing.
Return Value¶
Return 0 on success. If an error occurs, it will return -1.
Errors¶
This function relies on the Beostat
subsystem, which consists of the
proc
filesystem on the remote node, the sendstats
daemon 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.