pbs_statnode(3B)

NAME
pbs_statnode, pbs_statvnode, pbs_stathost - obtain status of PBS vnodes or hosts

SYNOPSIS
#include <pbs_error.h>
#include <pbs_ifl.h>

struct batch_status *pbs_stathost(int connect, char *id, struct attrl *attrib, char *extend)

struct batch_status *pbs_statnode(int connect, char *id, struct attrl *attrib, char *extend)

struct batch_status *pbs_statvnode(int connect, char *id, struct attrl *attrib, char *extend)

void pbs_statfree(struct batch_status *psj)

DESCRIPTION
Issue a batch request to obtain the status of PBS execution hosts or vnodes.

pbs_stathost returns information about the single host named in the call or about all hosts known to the PBS Server.

pbs_statnode is identical to pbs_stathost in function. It is retained for backward compatibility.

pbs_statvnode returns information about the single virtual node (vnode) named in the call or about all vnodes known to the PBS Server.

A Status Node batch request is generated and sent to the server over the connection specified by connect which is the return value of pbs_connect().

The id is the name of a host for pbs_stathost, or a vnode for pbs_statvnode, or the null string. If id specifies a name, the status of that host or vnode will be returned. If the id is a null string (or null pointer), the status of all hosts or vnodes at the server will be returned.

The parameter, attrib , is a pointer to an attrl structure which is defined in pbs_ifl.h as:

    struct attrl {
        struct attrl *next;
        char         *name;
        char         *resource;
        char         *value;
    };

The attrib list is terminated by the first entry where next is a null pointer. If attrib is given, then only the attributes in the list are returned by the server. Otherwise, all the attributes of a node are returned. When an attrib list is specified, the name member is a pointer to an attribute name. The resource member is not used and must be a pointer to a null string. The value member should always be a pointer to a null string.

The parameter, extend , is reserved for implementation-defined extensions.

The return value is a pointer to a list of batch_status structures, which is defined in pbs_ifl.h as:

    struct batch_status {
        struct batch_status *next;
        char                *name;
        struct attrl        *attribs;
        char                *text;
    }

It is up the user to free the structure when no longer needed, by calling pbs_statfree().

The vnode state value can be one or more comma-separated strings. All vnode states are documented in the pbs_node_attributes.7B man page.

DIAGNOSTICS
When the batch request generated by pbs_stathost(), pbs_statnode(), or pbs_statvnode() function has been completed successfully by a batch server, the routine will return a pointer to the batch_status structure. Otherwise, a null pointer is returned and the error code is set in the global integer pbs_errno.

SEE ALSO
qstat(1B), pbs_connect(3B)