bproc_nodestatus

Name

bproc_nodestatus -- get the status of a move the calling process to another node

Synopsis

#include <sys/bproc.h>

int bproc_nodestatus(int node);

Description

bproc_nodestatus returns the status of node or -1 if there was an error. Functionally, there are really only two node states: down where the slave is not connected to the master. Nothing can be done to the node in this state and all the others where the slave is connected. Internally, there are really only two node states, down and not down.

bproc_node_down

Down indicates that the slave is not connected to the master. Nothing can be done to the node while it is in this state.

bproc_node_error

Error is intended to indicate that there is some problem with the node. the node is ready for general use. The master daemon will automatically place the node in this state if the node setup script (/etc/beowulf/node_up) completes successfully.

bproc_node_up

Up is intended to indicate that the node is ready for general use. The master daemon will automatically place the node in this state if the node setup script (/etc/beowulf/node_up) completes successfully.

Return value

On success, zero is returned. On error, -1 is returned and errno is set appropriately.

Errors

EPERM

The process does not have permission to move to node.

ELOOP

The process is already running on node.

EINVAL

node is an invalid node number or node is down.

EBUSY

The BProc system is not running.

See Also

bproc_rfork(2), bproc_execmove(2)