beostat_is_node_available

Name

beostat_is_node_available -- determine if a given user/group can run on a given node

Synopsis

#include <sys/beostat.h>
int beostat_is_node_available (int node, uid_t uid, gid_t *gid_list, int gid_size);

Arguments

node
The node of interest
uid
The user identifier number
gid_list
A pointer to a list of group identifier numbers
gid_size
The number of elements in the previous arguments array

Description

beostat_is_node_available executes on the master node and determines if the given user with specified UID and belonging to the groups in gid_list has permission to run on a given node.

See the manual page for beostat_get_avail_nodes_by_id for a example of a similar function.

Return Value

Returns 1 if the node can be used, 0 if not, and -1 if an error occurs.

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.