pbs_sigjob.3B 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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_sigjob 3B "12 July 2017" Local "PBS Professional"
  37. .SH NAME
  38. pbs_sigjob - send a signal to a PBS batch job
  39. .SH SYNOPSIS
  40. #include <pbs_error.h>
  41. .br
  42. #include <pbs_ifl.h>
  43. .sp
  44. .B int pbs_sigjob(\^int\ connect, char\ *job_id, char\ *signal, char\ *extend\^)
  45. .SH DESCRIPTION
  46. Issue a batch request to send a signal to a batch job.
  47. .LP
  48. A
  49. .I "Signal Job"
  50. batch request is generated and sent to the server over the connection
  51. specified by
  52. .I connect
  53. which is the return value of \f3pbs_connect\f1().
  54. If the batch job is in the
  55. .I running
  56. or
  57. .I suspended
  58. state, the batch server will send the job the signal number corresponding
  59. to the signal named in
  60. .I signal .
  61. .LP
  62. The
  63. .I job_id
  64. argument identifies which job is to be signaled. It is specified in the form:
  65. .RS 4
  66. .I "sequence_number.server"
  67. .RE
  68. .LP
  69. The
  70. .I signal
  71. argument is the name of a signal. It may be the alphabetic form with or
  72. without the SIG prefix, or it may be a numeric string for the signal number.
  73. If the name of the signal
  74. is not a recognized signal name on the execution host, no signal is
  75. sent and an error is returned.
  76. .br
  77. Certain special names are recognized:
  78. .br
  79. .B suspend
  80. can be used only on running jobs. This signal puts the job into a suspended state.
  81. .br
  82. .B resume
  83. can be used only on suspended jobs. This signal marks the job so that
  84. the scheduler can resume the job when resources are available.
  85. .br
  86. .B admin-suspend
  87. can be used only on running jobs. This signal puts the job into a
  88. suspended state, and puts the job's vnodes into the
  89. .I maintenance
  90. state.
  91. .br
  92. .B admin-resume
  93. can be used only on admin-suspended jobs. This signal directly resumes
  94. the job. When the last admin-suspended job has been admin-resumed,
  95. the vnode leaves the
  96. .I maintenance
  97. state.
  98. .LP
  99. The parameter,
  100. .I extend ,
  101. is reserved for implementation-defined extensions.
  102. .SH "SEE ALSO"
  103. qsig(1B) and pbs_connect(3B)
  104. .SH DIAGNOSTICS
  105. When the batch request generated by \f3pbs_sigjob\f1()
  106. function has been completed successfully by a batch server, the routine will
  107. return 0 (zero).
  108. Otherwise, a non zero error is returned. The error number is also set
  109. in pbs_errno.