1Slurm API(3)              Slurm job signal functions              Slurm API(3)
2
3
4

NAME

6       slurm_kill_job, slurm_kill_job_step,
7       slurm_signal_job, slurm_signal_job_step,
8       slurm_terminate_job_step - Slurm job signal calls
9

SYNTAX

11       #include <slurm/slurm.h>
12
13       int slurm_kill_job (
14            uint32_t job_id,
15            uint16_t signal,
16            uint16_t batch_flag
17       );
18
19       int slurm_kill_job_step (
20            uint32_t job_id,
21            uint32_t job_step_id,
22            uint16_t signal
23       );
24
25       int slurm_signal_job (
26            uint32_t job_id,
27            uint16_t signal
28       );
29
30       int slurm_signal_job_step (
31            uint32_t job_id,
32            uint32_t job_step_id,
33            uint16_t signal
34       );
35
36       int slurm_terminate_job_step (
37            uint32_t job_id,
38            uint32_t job_step_id,
39       );
40

ARGUMENTS

42       batch_flag If non-zero then signal only the batch job shell.
43
44       job_id Slurm job id number.
45
46       job_step_id
47              Slurm job step id number.
48
49       signal Signal to be sent to the job or job step.
50

DESCRIPTION

52       slurm_kill_job  Request  that  a signal be sent to either the batch job
53       shell (if batch_flag is non-zero) or all steps of  the  specified  job.
54       If the job is pending and the signal is SIGKILL, the job will be termi‐
55       nated immediately.  This function may only be successfully executed  by
56       the job's owner or user root.
57
58       slurm_kill_job_step  Request  that  a  signal be sent to a specific job
59       step.  This function may only be successfully  executed  by  the  job's
60       owner or user root.
61
62       slurm_signal_job Request that the specified signal be sent to all steps
63       of an existing job.
64
65       slurm_signal_job_step Request that the specified signal be sent  to  an
66       existing job step.
67
68       slurm_terminate_job_step  Request that terminates a job step by sending
69       a REQUEST_TERMINATE_TASKS rpc to all slurmd of a job step.
70

RETURN VALUE

72       On success, zero is returned. On error, -1 is returned, and Slurm error
73       code is set appropriately.
74

ERRORS

76       SLURM_PROTOCOL_VERSION_ERROR Protocol version has changed, re-link your
77       code.
78
79       ESLURM_DEFAULT_PARTITION_NOT_SET the system lacks a valid default  par‐
80       tition.
81
82       ESLURM_INVALID_JOB_ID the requested job id does not exist.
83
84       ESLURM_JOB_SCRIPT_MISSING the batch_flag was set for a non-batch job.
85
86       ESLURM_ALREADY_DONE the specified job has already completed and can not
87       be modified.
88
89       ESLURM_ACCESS_DENIED the requesting user lacks  authorization  for  the
90       requested action (e.g. trying to delete or modify another user's job).
91
92       ESLURM_INTERCONNECT_FAILURE failed to configure the node interconnect.
93
94       SLURM_PROTOCOL_SOCKET_IMPL_TIMEOUT  Timeout in communicating with Slurm
95       controller.
96
97

NOTE

99       These functions are included in the libslurm  library,  which  must  be
100       linked to your process for use (e.g. "cc -lslurm myprog.c").
101
102

COPYING

104       Copyright  (C)  2002 The Regents of the University of California.  Pro‐
105       duced at  Lawrence  Livermore  National  Laboratory  (cf,  DISCLAIMER).
106       CODE-OCEC-09-009. All rights reserved.
107
108       This  file  is  part  of  Slurm,  a  resource  management program.  For
109       details, see <https://slurm.schedmd.com/>.
110
111       Slurm is free software; you can redistribute it and/or modify it  under
112       the  terms  of  the GNU General Public License as published by the Free
113       Software Foundation; either version 2  of  the  License,  or  (at  your
114       option) any later version.
115
116       Slurm  is  distributed  in the hope that it will be useful, but WITHOUT
117       ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY  or
118       FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU General Public License
119       for more details.
120

SEE ALSO

122       scancel(1), slurm_get_errno(3), slurm_perror(3), slurm_strerror(3)
123
124
125
126April 2015                Slurm job signal functions              Slurm API(3)
Impressum