1pbs_statnode(3B) PBS pbs_statnode(3B)
2
3
4
6 pbs_statnode - obtain status of pbs nodes
7
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
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 only supported attribute names relat‐
49 ing to nodes are "state" and "properties". The resource member is not
50 used and must be a pointer to a null string. The value member should
51 aways be a pointer to a null string.
52
53 The parameter, extend, is reserved for implementation defined exten‐
54 sions.
55
56 The return value is a pointer to a list of batch_status structures,
57 which is defined in pbs_ifl.h as:
58
59 struct batch_status {
60 struct batch_status *next;
61 char *name;
62 struct attrl *attribs;
63 char *text;
64 }
65
66 It is up the user to free the structure when no longer needed, by call‐
67 ing pbs_statfree().
68
70 qstat(1B) and pbs_connect(3B)
71
73 When the batch request generated by pbs_statnode() function has been
74 completed successfully by a batch server, the routine will return a
75 pointer to the batch_status structure. Otherwise, a null pointer is
76 returned and the error code is set in the global integer pbs_errno.
77
78
79
80
81Local pbs_statnode(3B)