pbs_statsched.3B 3.7 KB

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