pbs_statque.3B 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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_statque 3B "3 March 2015" Local "PBS Professional"
  37. .SH NAME
  38. pbs_statque - obtain status of PBS batch queues
  39. .SH SYNOPSIS
  40. #include <pbs_error.h>
  41. .br
  42. #include <pbs_ifl.h>
  43. .sp
  44. .B struct batch_status *pbs_statque(\^int\ connect, char\ *id, struct\ attrl\ *attrib, char\ *extend)
  45. .sp
  46. .B void pbs_statfree(\^struct batch_status *psj\^)
  47. .SH DESCRIPTION
  48. Issue a batch request to obtain the status of a batch queue.
  49. .LP
  50. A
  51. .I "Status Queue"
  52. batch request is generated and sent to the server over the connection
  53. specified by
  54. .I connect
  55. which is the return value of \f3pbs_connect\f1().
  56. .LP
  57. The
  58. .I id
  59. is the name of a queue, in the form:
  60. .RS 4
  61. .I queue_name
  62. .RE
  63. or the null string. If
  64. .I queue_name
  65. is specified, the status of the queue named
  66. .I queue_name
  67. at the server is returned. If the
  68. .I id
  69. is a null string or null pointer, the status of all
  70. queues at the server is returned.
  71. .LP
  72. The parameter,
  73. .I attrib ,
  74. is a pointer to an
  75. .I attrl
  76. structure which is defined in pbs_ifl.h as:
  77. .sp
  78. .Ty
  79. .nf
  80. struct attrl {
  81. struct attrl *next;
  82. char *name;
  83. char *resource;
  84. char *value;
  85. };
  86. .fi
  87. .sp
  88. The
  89. .I attrib
  90. list is terminated by the first entry where
  91. .I next
  92. is a null pointer. If
  93. .I attrib
  94. is given, then only the attributes in the list are returned by the server.
  95. Otherwise, all the attributes of a queue are returned.
  96. When an
  97. .I attrib
  98. list is specified, the
  99. .I name
  100. member is a pointer to an attribute name as listed in pbs_alterjob(3B) and
  101. pbs_submit(3B). The
  102. .I resource
  103. member is only used if the name member is ATTR_l, otherwise it should be a
  104. pointer to a null string.
  105. The
  106. .I value
  107. member should always be a pointer to a null string.
  108. .LP
  109. When
  110. .B pbs_statque
  111. is used to get the attributes of an object, a single
  112. .I attrl
  113. data structure is returned for each parameterized attribute.
  114. .LP
  115. The parameter,
  116. .I extend ,
  117. is reserved for implementation-defined extensions.
  118. .LP
  119. The return value is a pointer to a list of
  120. .I batch_status
  121. structures, which is defined in pbs_ifl.h as:
  122. .sp
  123. .Ty
  124. .nf
  125. struct batch_status {
  126. struct batch_status *next;
  127. char *name;
  128. struct attrl *attribs;
  129. char *text;
  130. }
  131. .fi
  132. .LP
  133. It is up the user to free the structure when no longer needed, by calling
  134. \f3pbs_statfree\f1().
  135. .LP
  136. .SH "SEE ALSO"
  137. qstat(1B) and pbs_connect(3B)
  138. .SH DIAGNOSTICS
  139. When the batch request generated by \f3pbs_statque\f1()
  140. function has been completed successfully by a batch server, the routine will
  141. return a pointer to the batch_status structure.
  142. Otherwise, a null pointer is returned and the error code
  143. is set in the global integer pbs_errno.