beostat_get_name¶
Name¶
beostat_get_name – get the name of node
Synopsis¶
#include <sys/beostat.h>
int beostat_get_name (int node, char **name);
Arguments¶
node
The node to query
name
A handle to a
char
, which will be allocated with an appropriate amount of memory and then set to the name of a node. The caller must free the allocated memory when it is done with the memory.
Description¶
beostat_get_name
executes on the master node and returns the name of
a given node.
Examples¶
char *name;
beostat_get_name (3, &name);
printf ("The name for node 3 is %s\n", name);
free (name);
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.