bproc_setnodestatus

Name

bproc_setnodestatus -- Change the status of a node

Synopsis

#include <sys/bproc.h>

int bproc_setnodestatus (int node, int status);

Arguments

node

The node to change the status of

status

The new status for the node

Description

This call sets the status of a node. Note that it is not possible to change the status of a node that is marked as "down", "pwroff", or "halt".

bproc_node_down

The node is not connected to the master daemon. It may be off or crashed or not far enough along in its boot process to connect to the master daemon.

bproc_node_unavailable

The node is running but is currently unavailable to users. Nodes are only in this state if set that way explicitly by the administrator.

bproc_node_error

There is a problem with the node. Nodes are assigned this state if booting is unsuccessful.

bproc_node_up

The node is up and ready to accept processes. This is the only state in which non-root users can send jobs to the node.

bproc_node_reboot

Setting a node to this state will tell it to reboot.

bproc_node_halt

Setting a node to this state will tell it to halt.

bproc_node_pwroff

Setting a node to this state will tell it to poweroff.

bproc_node_boot

The node is in the process of coming up (running the node_up script). A node should only be put in this state by the BProc master daemon.

Return Value

Returns 0 on success.

Returns -1 on error, and sets errno.

Errors

EPERM

You do not have root access

ENOMEM

Out of memory

EIO

I/O error