pbs_manager.3B 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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_manager 3B "13 Sept 2011" Local "PBS Professional"
  37. .SH NAME
  38. .B pbs_manager
  39. \- modifies a PBS batch object
  40. .SH SYNOPSIS
  41. #include <pbs_error.h>
  42. .br
  43. #include <pbs_ifl.h>
  44. .sp
  45. .B int pbs_manager(\^int\ connect, int\ command, int\ obj_type, char\ *obj_name,
  46. .B struct\ attropl\ *attrib, char\ *extend\^)
  47. .SH DESCRIPTION
  48. Issue a batch request to perform administration functions at a server.
  49. With this request, server objects such as queues can
  50. be created and deleted, and have their attributes set and unset.
  51. .LP
  52. A
  53. .I "Manage"
  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. This request requires full batch administrator privilege.
  59. .LP
  60. The parameter,
  61. .I command ,
  62. specifies the operation to be performed. See pbs_ifl.h:
  63. .br
  64. .IP " " 4
  65. .B MGR_CMD_CREATE \ \
  66. creates the object
  67. .br
  68. .B MGR_CMD_DELETE \ \
  69. deletes the object
  70. .br
  71. .B MGR_CMD_SET \ \ \ \ \
  72. sets the value
  73. .br
  74. .B MGR_CMD_UNSET\ \ \ \
  75. unsets the value
  76. .br
  77. .B MGR_CMD_IMPORT \ \
  78. imports the hook
  79. .br
  80. .B MGR_CMD_EXPORT \ \
  81. exports the hook
  82. .LP
  83. The parameter,
  84. .I obj_type ,
  85. declares the type of object upon which the command operates. See pbs_ifl.h:
  86. .br
  87. .IP " " 4
  88. .B MGR_OBJ_SERVER \ \
  89. Server object
  90. .br
  91. .B MGR_OBJ_QUEUE \ \ \
  92. Queue object
  93. .br
  94. .B MGR_OBJ_NODE \ \ \ \
  95. Node object
  96. .br
  97. .B MGR_OBJ_HOOK \ \ \ \
  98. Hook object
  99. .LP
  100. The parameter,
  101. .I obj_name ,
  102. is the name of the specific object.
  103. .LP
  104. The parameter,
  105. .I attrib ,
  106. is a pointer to an
  107. .I attropl
  108. structure which is defined in pbs_ifl.h as:
  109. .sp
  110. .Ty
  111. .nf
  112. struct attropl {
  113. char *name;
  114. char *resource;
  115. char *value;
  116. enum batch_op op;
  117. struct attropl *next;
  118. };
  119. .fi
  120. .sp
  121. The
  122. .I attrib
  123. list is terminated by the first entry where
  124. .I next
  125. is a null pointer.
  126. .LP
  127. The
  128. .I name
  129. member points to a string which is the name of the attribute.
  130. .LP
  131. If the attribute is one which contains a set of resources, the
  132. specific resource is specified in the structure member
  133. .I resource .
  134. Otherwise, the member resource is pointer to a null string.
  135. .LP
  136. The
  137. .I value
  138. member points to a string which is the new value of the attribute.
  139. For parameterized limit attributes, this string contains
  140. all parameters for the attribute.
  141. .LP
  142. The
  143. .I op
  144. member defines the manner in which the new value is assigned to the
  145. attribute.
  146. The operators are:
  147. .B "enum batch_op { ..., SET, UNSET, INCR, DECR };"
  148. .br
  149. .LP
  150. For MGR_CMD_IMPORT, specify attropl "name" as "content-type",
  151. "content-encoding", and "input-file" along with the corresponding
  152. "value" and an "op" of SET.
  153. For MGR_CMD_EXPORT, specify attropl "name" as "content-type",
  154. "content-encoding", and "output-file" along with the corresponding
  155. "value" and an "op" of SET.
  156. The parameter
  157. .I extend
  158. is reserved for implementation-defined extensions.
  159. .LP
  160. Privilege required for functions depends on whether those functions
  161. are used with hooks.
  162. .br
  163. When not used with hooks:
  164. .IP
  165. Functions MGR_CMD_CREATE and MGR_CMD_DELETE require PBS Manager privilege.
  166. .br
  167. Functions MGR_CMD_SET and MGR_CMD_UNSET require PBS Manager or Operator privilege.
  168. .LP
  169. When used with hooks:
  170. .IP
  171. All commands require root privilege on the server host.
  172. .LP
  173. Functions MGR_CMD_IMPORT, MGR_CMD_EXPORT, and MGR_OBJ_HOOK are used only with hooks,
  174. and therefore require root privilege on the server host.
  175. .SH DIAGNOSTICS
  176. When the batch request generated by \f3pbs_manager\f1()
  177. function has been completed successfully by a batch server, the routine will
  178. return 0 (zero).
  179. Otherwise, a non zero error is returned. The error number is also set
  180. in pbs_errno.
  181. .SH SEE ALSO
  182. The
  183. .B PBS Professional Programmer's Guide,
  184. .br
  185. qmgr(1B),
  186. pbs_connect(3B)