pbs_statresv.3B 4.3 KB

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