blob: da043691486ecee65c310cde92c974044d46ad91 [file] [log] [blame] [edit]
.TH SCANCEL "1" "April 2009" "scancel 2.0" "Slurm components"
.SH "NAME"
scancel \- Used to signal jobs or job steps that are under the control of Slurm.
.SH "SYNOPSIS"
\fBscancel\fR [\fIOPTIONS\fR...] [\fIjob_id\fR[.\fIstep_id\fR]] [\fIjob_id\fR[.\fIstep_id\fR]...]
.SH "DESCRIPTION"
\fBscancel\fR is used to signal or cancel jobs or job steps. An arbitrary number
of jobs or job steps may be signaled using job specification filters or a
space separated list of specific job and/or job step IDs. A job or job step
can only be signaled by the owner of that job or user root. If an attempt is
made by an unauthorized user to signal a job or job step, an error message will
be printed and the job will not be signaled.
.SH "OPTIONS"
.TP
\fB\-b\fR, \fB\-\-batch\fR
Signal the batch job shell and its child processes.
This is not applicable if \fIstep_id\fR is specified.
NOTE: The shell itself may exit upon receipt of many signals.
You may avoid this by explicitly trap signals within the shell
script (e.g. "trap <arg> <signals>"). See the shell documentation
for details.
.TP
\fB-\-ctld\fR
Send the job signal request to the slurmctld daemon rather than directly to the
slurmd daemons. This increases overhead, but offers better fault tolerance.
.TP
\fB\-\-help\fR
Print a help message describing all \fBscancel\fR options.
.TP
\fB\-i\fR, \fB\-\-interactive\fR
Interactive mode. Confirm each job_id.step_id before performing the cancel operation.
.TP
\fB\-n\fR, \fB\-\-name\fR=\fIjob_name\fR
The name of jobs to be signaled.
.TP
\fB\-p\fR, \fB\-\-partition\fR=\fIpartition_name\fR
The name of the partition from which jobs are to be signaled.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Do not report an error if the specified job is already completed.
This option is incompatible with the \fB\-\-verbose\fR option.
.TP
\fB\-s\fR, \fB\-\-signal\fR=\fIsignal_name\fR
The name or number of the signal to be send.
If no signal is specified, the specified job or step will be terminated.
.TP
\fB\-t\fR, \fB\-\-state\fR=\fIjob_state_name\fR
The state of the jobs to be signaled. \fIjob_state_name\fR may have a value of
either "PENDING", "RUNNING" or "SUSPENDED".
.TP
\fB\-u\fR, \fB\-\-user\fR=\fIuser_name\fR
The name of the user whose jobs are to be signaled.
.TP
\fB\-\-usage\fR
Print a brief help message listing the \fBscancel\fR options.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Print additional logging. Multiple v's increase logging detail.
This option is incompatible with the \fB\-\-quiet\fR option.
.TP
\fB\-V\fR, \fB\-\-Version\fR
Print the version number of the scancel command.
.TP
\fB\-w\fR, \fB\-\-nodelist=\fIhost1,host2,...\fR
Cancel any jobs using any of the given hosts. The list may be specified as
a comma\-separated list of hosts, a range of hosts (host[1\-5,7,...] for
example), or a filename. The host list will be assumed to be a filename only
if it contains a "/" character.
.TP
ARGUMENTS
.TP
\fIjob_id\fP
The Slurm job ID to be signaled.
.TP
\fIstep_id\fP
The step ID of the job step to be signaled.
If not specified, the operation is performed at the level of a job.
If neither \fB\-\-batch\fR nor \fB\-\-signal\fR are used,
the entire job will be terminated.
When \fB\-\-batch\fR is used, the batch shell processes will be signaled.
The child processes of the shell will not be signalled by SLURM, but
the shell may forward the signal.
When \fB\-\-batch\fR is not used but \fB\-\-signal\fR is used,
then all job steps will be signalled, but the batch script itself
will not be signalled.
.SH "ENVIRONMENT VARIABLES"
.PP
Some \fBscancel\fR options may be set via environment variables. These
environment variables, along with their corresponding options, are listed below.
(Note: commandline options will always override these settings)
.TP 20
\fBSCANCEL_BATCH\fR
\fB\-b, \-\-batch\fR
.TP 20
\fBSCANCEL_CTLD\fR
\fB\-\-ctld\fR
.TP 20
\fBSCANCEL_INTERACTIVE\fR
\fB\-i\fR, \fB\-\-interactive\fR
.TP 20
\fBSCANCEL_NAME\fR
\fB\-n\fR, \fB\-\-name\fR=\fIjob_name\fR
.TP 20
\fBSCANCEL_PARTITION\fR
\fB\-p\fR, \fB\-\-partition\fR=\fIpartition_name\fR
.TP 20
\fBSCANCEL_STATE\fR
\fB\-t\fR, \fB\-\-state\fR=\fIjob_state_name\fR
.TP 20
\fBSCANCEL_USER\fR
\fB\-u\fR, \fB\-\-user\fR=\fIuser_name\fR
.TP 20
\fBSCANCEL_VERBOSE\fR
\fB\-v\fR, \fB\-\-verbose\fR
.TP 20
\fBSLURM_CONF\fR
The location of the SLURM configuration file.
.SH "NOTES"
.LP
If multiple filters are supplied (e.g. \fB\-\-partition\fR and \fB\-\-name\fR)
only the jobs satisfying all of the filtering options will be signaled.
.LP
If a signal value of "KILL" (the default value) is to be sent to an entire
job, this will result in the job's termination and its resource allocation
being released.
.LP
Cancelling a job step will not result in a job being terminated.
The job must be cancelled to release a resource allocation.
.SH "EXAMPLES"
.TP
Send SIGTERM to steps 1 and 3 of job 1234:
scancel \-\-signal=TERM 1234.1 1234.3
.TP
Cancel job 1234 along with all of its steps:
scancel 1234
.TP
Send SIGKILL to all steps of job 1235, but do not cancel the job itself:
scancel \-\-signal=KILL 1235
.TP
Send SIGUSR1 to the batch shell processes of job 1236:
scancel \-\-signal=USR1 \-\-batch 1236
.TP
Cancel job all pending jobs belonging to user "bob" in partition "debug":
scancel \-\-state=PENDING \-\-user=bob \-\-partition=debug
.SH "COPYING"
Copyright (C) 2002-2007 The Regents of the University of California.
Copyright (C) 2008-2009 Lawrence Livermore National Security.
Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
CODE\-OCEC\-09\-009. All rights reserved.
.LP
This file is part of SLURM, a resource management program.
For details, see <https://computing.llnl.gov/linux/slurm/>.
.LP
SLURM is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
.LP
SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
.SH "SEE ALSO"
\fBslurm_kill_job\fR(3), \fBslurm_kill_job_step\fR(3)