pbs_statnode.3B 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. .\" Copyright (C) 1994-2018 Altair Engineering, Inc.
  2. .\" For more information, contact Altair at www.altair.com.
  3. .\"
  4. .\" This file is part of the PBS Professional ("PBS Pro") software.
  5. .\"
  6. .\" Open Source License Information:
  7. .\"
  8. .\" PBS Pro is free software. You can redistribute it and/or modify it under the
  9. .\" terms of the GNU Affero General Public License as published by the Free
  10. .\" Software Foundation, either version 3 of the License, or (at your option) any
  11. .\" later version.
  12. .\"
  13. .\" PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  14. .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15. .\" FOR A PARTICULAR PURPOSE.
  16. .\" See the GNU Affero General Public License for more details.
  17. .\"
  18. .\" You should have received a copy of the GNU Affero General Public License
  19. .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. .\"
  21. .\" Commercial License Information:
  22. .\"
  23. .\" For a copy of the commercial license terms and conditions,
  24. .\" go to: (http://www.pbspro.com/UserArea/agreement.html)
  25. .\" or contact the Altair Legal Department.
  26. .\"
  27. .\" Altair’s dual-license business model allows companies, individuals, and
  28. .\" organizations to create proprietary derivative works of PBS Pro and
  29. .\" distribute them - whether embedded or bundled with other software -
  30. .\" under a commercial license agreement.
  31. .\"
  32. .\" Use of Altair’s trademarks, including but not limited to "PBS™",
  33. .\" "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  34. .\" trademark licensing policies.
  35. .\"
  36. .TH pbs_statnode 3B "2 February 2016" Local "PBS Professional"
  37. .SH NAME
  38. .B pbs_statnode, pbs_statvnode, pbs_stathost
  39. \- obtain status of PBS vnodes or hosts
  40. .SH SYNOPSIS
  41. #include <pbs_error.h>
  42. .br
  43. #include <pbs_ifl.h>
  44. .sp
  45. .B struct batch_status *pbs_stathost(\^int\ connect, char\ *id, struct\ attrl\ *attrib, char\ *extend)
  46. .sp
  47. .B struct batch_status *pbs_statnode(\^int\ connect, char\ *id, struct\ attrl\ *attrib, char\ *extend)
  48. .sp
  49. .B struct batch_status *pbs_statvnode(\^int\ connect, char\ *id, struct\ attrl\ *attrib, char\ *extend)
  50. .sp
  51. .B void pbs_statfree(\^struct batch_status *psj\^)
  52. .SH DESCRIPTION
  53. Issue a batch request to obtain the status of PBS execution hosts or vnodes.
  54. .LP
  55. pbs_stathost returns information about the single host named in the call or
  56. about all hosts known to the PBS Server.
  57. .LP
  58. pbs_statnode is identical to pbs_stathost in function. It is retained for
  59. backward compatibility.
  60. .LP
  61. pbs_statvnode returns information about the single virtual node (vnode) named
  62. in the call or about all vnodes known to the PBS Server.
  63. .LP
  64. A
  65. .I "Status Node"
  66. batch request is generated and sent to the server over the connection
  67. specified by
  68. .I connect
  69. which is the return value of \f3pbs_connect\f1().
  70. .LP
  71. The
  72. .I id
  73. is the name of a host for pbs_stathost, or a vnode for pbs_statvnode,
  74. or the null string. If
  75. .I id
  76. specifies a name, the status of that host or vnode will be returned. If the
  77. .I id
  78. is a null string (or null pointer), the status of all hosts or
  79. vnodes at the server will be returned.
  80. .LP
  81. The parameter,
  82. .I attrib ,
  83. is a pointer to an
  84. .I attrl
  85. structure which is defined in pbs_ifl.h as:
  86. .sp
  87. .Ty
  88. .nf
  89. struct attrl {
  90. struct attrl *next;
  91. char *name;
  92. char *resource;
  93. char *value;
  94. };
  95. .fi
  96. .sp
  97. The
  98. .I attrib
  99. list is terminated by the first entry where
  100. .I next
  101. is a null pointer. If
  102. .I attrib
  103. is given, then only the attributes in the list are returned by the server.
  104. Otherwise, all the attributes of a node are returned.
  105. When an
  106. .I attrib
  107. list is specified, the
  108. .I name
  109. member is a pointer to an attribute name.
  110. The
  111. .I resource
  112. member is not used and must be a pointer to a null string.
  113. The
  114. .I value
  115. member should always be a pointer to a null string.
  116. .LP
  117. The parameter,
  118. .I extend ,
  119. is reserved for implementation-defined extensions.
  120. .LP
  121. The return value is a pointer to a list of
  122. .I batch_status
  123. structures, which is defined in pbs_ifl.h as:
  124. .sp
  125. .Ty
  126. .nf
  127. struct batch_status {
  128. struct batch_status *next;
  129. char *name;
  130. struct attrl *attribs;
  131. char *text;
  132. }
  133. .fi
  134. .LP
  135. It is up the user to free the structure when no longer needed, by calling
  136. \f3pbs_statfree\f1().
  137. .LP
  138. The vnode state value can be one or more comma-separated strings.
  139. All vnode states are documented in the pbs_node_attributes.7B man page.
  140. .SH DIAGNOSTICS
  141. When the batch request generated by
  142. .B "pbs_stathost(), pbs_statnode(),"
  143. or
  144. .B pbs_statvnode()
  145. function has been completed successfully by a batch server, the routine will
  146. return a pointer to the batch_status structure.
  147. Otherwise, a null pointer is returned and the error code
  148. is set in the global integer pbs_errno.
  149. .SH SEE ALSO
  150. qstat(1B),
  151. pbs_connect(3B)