1scancel(1)                      Slurm Commands                      scancel(1)
2
3
4

NAME

6       scancel  -  Used to signal jobs or job steps that are under the control
7       of Slurm.
8
9

SYNOPSIS

11       scancel           [OPTIONS...]            [job_id[_array_id][.step_id]]
12       [job_id[_array_id][.step_id]...]
13
14

DESCRIPTION

16       scancel  is used to signal or cancel jobs, job arrays or job steps.  An
17       arbitrary number of jobs or job steps may be signaled using job  speci‐
18       fication  filters  or a space separated list of specific job and/or job
19       step IDs.  If the job ID of a job array is specified with an  array  ID
20       value  then  only that job array element will be cancelled.  If the job
21       ID of a job array is specified without an array ID value then  all  job
22       array  elements  will  be  cancelled.   While a heterogeneous job is in
23       pending state, only the entire job can be cancelled  rather  than  it's
24       individual  components.  A request to cancel an individual component of
25       a heterogeneous job not in pending state will return an  error.   After
26       the job has begun execution, the individual component can be cancelled.
27       A job or job step can only be signaled by the owner of that job or user
28       root.  If an attempt is made by an unauthorized user to signal a job or
29       job step, an error message will be printed and the job will not be sig‐
30       naled.
31
32

OPTIONS

34       -A, --account=account
35              Restrict  the  scancel  operation  to  jobs  under  this  charge
36              account.
37
38
39       -b, --batch
40              Signal only the batch step (the shell script), but not any other
41              steps  nor any children of the shell script. This is useful when
42              the shell script has to trap the signal and take  some  applica‐
43              tion defined action.  This is not applicable if step_id is spec‐
44              ified.  NOTE: The shell itself may exit  upon  receipt  of  many
45              signals.   You  may avoid this by explicitly trap signals within
46              the shell script (e.g. "trap <arg> <signals>").  See  the  shell
47              documentation for details.  Also see the -f, --full option.
48
49
50       --ctld Send  the job signal request to the slurmctld daemon rather than
51              directly to the slurmd daemons.  This  increases  overhead,  but
52              offers  better fault tolerance.  This is the default behavior on
53              architectures using front end nodes (e.g.  Cray ALPS  computers)
54              or when the --clusters option is used.
55
56
57       -f, --full
58              Signal  all  steps  associated  with the job including any batch
59              step (the shell script plus all of  its  child  processes).   By
60              default,  signals  other  than SIGKILL are not sent to the batch
61              step.  Also see the -b, --batch option.
62
63
64       --help Print a help message describing all scancel options.
65
66
67       -H, --hurry
68              Do not stage out any burst buffer data.
69
70
71       -i, --interactive
72              Interactive mode. Confirm each job_id.step_id before  performing
73              the cancel operation.
74
75
76       -M, --clusters=<string>
77              Clusters  to  issue commands to.  Note that the SlurmDBD must be
78              up for this option to work properly.
79
80
81       -n, --jobname=job_name, --name=job_name
82              Restrict the scancel operation to jobs with this job name.
83
84
85       -p, --partition=partition_name
86              Restrict the scancel operation to jobs in this partition.
87
88
89       -q, --qos=qos
90              Restrict the scancel operation to jobs with this quality of ser‐
91              vice.
92
93
94       -Q, --quiet
95              Do  not  report  an  error  if the specified job is already com‐
96              pleted.  This option is incompatible with the --verbose option.
97
98
99
100       -R, --reservation=reservation_name
101              Restrict the scancel operation to  jobs  with  this  reservation
102              name.
103
104
105       --sibling=cluster_name
106              Remove an active sibling job from a federated job.
107
108
109       -s, --signal=signal_name
110              The name or number of the signal to send.  If this option is not
111              used the specified job or step will be terminated. Note. If this
112              option  is  used the signal is sent directly to the slurmd where
113              the job is running bypassing the slurmctld thus  the  job  state
114              will  not  change even if the signal is delivered to it. Use the
115              scontrol command if you want the job state change  be  known  to
116              slurmctld.
117
118
119       -t, --state=job_state_name
120              Restrict   the   scancel   operation  to  jobs  in  this  state.
121              job_state_name may have a value of either  "PENDING",  "RUNNING"
122              or "SUSPENDED".
123
124
125       -u, --user=user_name
126              Restrict the scancel operation to jobs owned by this user.
127
128
129       --usage
130              Print a brief help message listing the scancel options.
131
132
133       -v, --verbose
134              Print  additional logging. Multiple v's increase logging detail.
135              This option is incompatible with the --quiet option.
136
137
138       -V, --version
139              Print the version number of the scancel command.
140
141
142       -w, --nodelist=host1,host2,...
143              Cancel any jobs using any of the given hosts.  The list  may  be
144              specified  as  a comma-separated list of hosts, a range of hosts
145              (host[1-5,7,...] for example), or a filename. The host list will
146              be assumed to be a filename only if it contains a "/" character.
147
148
149       --wckey=wckey
150              Restrict the scancel operation to jobs using this workload char‐
151              acterization key.
152
153
154       ARGUMENTS
155
156
157       job_id The Slurm job ID to be signaled.
158
159
160       step_id
161              The step ID of the job step to be signaled.  If  not  specified,
162              the operation is performed at the level of a job.
163
164              If neither --batch nor --signal are used, the entire job will be
165              terminated.
166
167              When --batch is used, the batch shell  processes  will  be  sig‐
168              naled.  The child processes of the shell will not be signaled by
169              Slurm, but the shell may forward the signal.
170
171              When --batch is not used but --signal  is  used,  then  all  job
172              steps  will be signaled, but the batch script itself will not be
173              signaled.
174
175

ENVIRONMENT VARIABLES

177       Some scancel options may be set via environment variables. These  envi‐
178       ronment  variables,  along with their corresponding options, are listed
179       below.  (Note: commandline options will always override these settings)
180
181       SCANCEL_ACCOUNT     -A, --account=account
182
183       SCANCEL_BATCH       -b, --batch
184
185       SCANCEL_CTLD        --ctld
186
187       SCANCEL_FULL        -f, --full
188
189       SCANCEL_HURRY       -H, --hurry
190
191       SCANCEL_INTERACTIVE -i, --interactive
192
193       SCANCEL_NAME        -n, --name=job_name
194
195       SCANCEL_PARTITION   -p, --partition=partition_name
196
197       SCANCEL_QOS         -q, --qos=qos
198
199       SCANCEL_STATE       -t, --state=job_state_name
200
201       SCANCEL_USER        -u, --user=user_name
202
203       SCANCEL_VERBOSE     -v, --verbose
204
205       SCANCEL_WCKEY       --wckey=wckey
206
207       SLURM_CONF          The location of the Slurm configuration file.
208
209

NOTES

211       If multiple filters are supplied (e.g. --partition and --name) only the
212       jobs satisfying all of the filtering options will be signaled.
213
214       Cancelling a job step will not result in the job being terminated.  The
215       job must be cancelled to release a resource allocation.
216
217       To cancel a job, invoke scancel without  --signal  option.   This  will
218       send  first  a SIGCONT to all steps to eventually wake them up followed
219       by a SIGTERM, then wait the KillWait duration defined in the slurm.conf
220       file  and  finally  if  they  have not terminated send a SIGKILL.  This
221       gives time for the running job/step(s) to clean up.
222
223       If a signal value of "KILL" is sent to an entire job, this will  cancel
224       the active job steps but not cancel the job itself.
225
226       On Cray systems, all signals except SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP,
227       SIGTTIN, SIGTTOU, SIGURG, or SIGWINCH cause the ALPS reservation to  be
228       released.  The job however will not be terminated except in the case of
229       SIGKILL and may then be used for post processing.
230
231

AUTHORIZATION

233       When using the Slurm db, users who have AdminLevel's defined  (Operator
234       or  Admin) and users who are account coordinators are given the author‐
235       ity to invoke scancel on other user's jobs.
236
237

EXAMPLES

239       Send SIGTERM to steps 1 and 3 of job 1234:
240              scancel --signal=TERM 1234.1 1234.3
241
242
243       Cancel job 1234 along with all of its steps:
244              scancel 1234
245
246
247       Send SIGKILL to all steps of job  1235,  but  do  not  cancel  the  job
248       itself:
249              scancel --signal=KILL 1235
250
251
252       Send SIGUSR1 to the batch shell processes of job 1236:
253              scancel --signal=USR1 --batch 1236
254
255
256       Cancel  job  all  pending  jobs  belonging  to  user "bob" in partition
257       "debug":
258              scancel --state=PENDING --user=bob --partition=debug
259
260
261       Cancel only array ID 4 of job array 1237
262              scancel 1237_4
263
264

COPYING

266       Copyright (C) 2002-2007 The Regents of the  University  of  California.
267       Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
268       Copyright (C) 2008-2011 Lawrence Livermore National Security.
269       Copyright (C) 2010-2015 SchedMD LLC.
270
271       This  file  is  part  of  Slurm,  a  resource  management program.  For
272       details, see <https://slurm.schedmd.com/>.
273
274       Slurm is free software; you can redistribute it and/or modify it  under
275       the  terms  of  the GNU General Public License as published by the Free
276       Software Foundation; either version 2  of  the  License,  or  (at  your
277       option) any later version.
278
279       Slurm  is  distributed  in the hope that it will be useful, but WITHOUT
280       ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY  or
281       FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU General Public License
282       for more details.
283
284

SEE ALSO

286       slurm_kill_job (3), slurm_kill_job_step (3)
287
288
289
290June 2018                       Slurm Commands                      scancel(1)
Impressum