bproc_nodelist

Name

bproc_nodelist -- get status information for single node

Synopsis

#include <sys/bproc.h>

int bproc_nodelist( struct bproc_node_info_t ** list );

Description

bproc_nodelist returns a list of struct bproc_node_info_t structures - one for every node in the system. A pointer to this list is stored in the pointer pointed to by the list parameter. The return value is the number of elements in the list. The memory for the list is allocated using malloc and it is up to the caller to free this memory.

Using bproc_nodelist function is more results in considerably less message traffic than calling bproc_nodeinfo for every node.

struct bproc_node_info_t {
    int      node;          /* node number */
    int      status;        /* node status.  up,down,etc */
    int      mode;          /* permission bits */
    uint16_t user;          /* node owner */
    uint16_t group;         /* node group id */
    uint32_t addr;          /* current node address */
};

Return Value

On success, bproc_nodelist will return the number of elements in the list. On error, it will return -1 and errno will be set appropriately.

Errors

EBUSY

The BProc system is not running.

See Also

bproc_nodeinfo(2)