beostat_get_cpu_count

Name

beostat_get_cpu_count -- return the number of processors 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 the node parameter.

Description

beostat_get_cpu_count will get the number of CPUs on a given node.

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.