1pbs_statnode(3B)                      PBS                     pbs_statnode(3B)
2
3
4

NAME

6       pbs_statnode - obtain status of pbs nodes
7

SYNOPSIS

9       #include <pbs_error.h>
10       #include <pbs_ifl.h>
11
12       struct      batch_status      *pbs_statnode(int connect,      char *id,
13       struct attrl *attrib, char *extend)
14
15       void pbs_statfree(struct batch_status *psj)
16

DESCRIPTION

18       Issue a batch request to obtain the status of a PBS node or nodes.
19
20       A Status Node batch request is generated and sent to  the  server  over
21       the  connection  specified  by  connect  which  is  the return value of
22       pbs_connect().
23
24       The id is the name of a node or the null string.   If  id  specifies  a
25       node  name,  the  status of that node will be returned.  If the id is a
26       null string (or null pointer), the status of all nodes  at  the  server
27       will be returned.
28
29       In  TORQUE  2.1.0,  if  the id starts with a ":" and followed by a node
30       property, all nodes with that property are returned; creating  a  "node
31       group"  functionality.   The  string ":ALL" is specially handled and is
32       the same as passing a null string.
33
34       The parameter, attrib, is a pointer to  an  attrl  structure  which  is
35       defined in pbs_ifl.h as:
36
37           struct attrl {
38               struct attrl *next;
39               char         *name;
40               char         *resource;
41               char         *value;
42           };
43
44       The  attrib  list is terminated by the first entry where next is a null
45       pointer.  If attrib is given, then only the attributes in the list  are
46       returned  by  the  server.  Otherwise, all the attributes of a node are
47       returned.  When an attrib list is  specified,  the  name  member  is  a
48       pointer to a attribute name.  The supported attribute names relating to
49       nodes are "state", "properties", "np", "ntype", "jobs",  "status",  and
50       "note".   The  resource  member  is not used and must be a pointer to a
51       null string.  The value member should aways be  a  pointer  to  a  null
52       string.
53
54       The  parameter,  extend,  is reserved for implementation defined exten‐
55       sions.
56
57       The return value is a pointer to a  list  of  batch_status  structures,
58       which is defined in pbs_ifl.h as:
59
60           struct batch_status {
61               struct batch_status *next;
62               char                *name;
63               struct attrl        *attribs;
64               char                *text;
65           }
66
67       It is up the user to free the structure when no longer needed, by call‐
68       ing pbs_statfree().
69

SEE ALSO

71       qstat(1B) and pbs_connect(3B)
72

DIAGNOSTICS

74       When the batch request generated by pbs_statnode()  function  has  been
75       completed  successfully  by  a  batch server, the routine will return a
76       pointer to the batch_status structure.  Otherwise, a  null  pointer  is
77       returned and the error code is set in the global integer pbs_errno.
78
79
80
81
82Local                                                         pbs_statnode(3B)
Impressum