scancel - Used to signal jobs or job steps that are under the control of Slurm.
scancel [OPTIONS...] [job_id[_array_id][.step_id]] [job_id[_array_id][.step_id]...]
scancel is used to signal or cancel jobs, job arrays 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. If the job ID of a job array is specified with an array ID value then only that job array element will be cancelled. If the job ID of a job array is specified without an array ID value then all job array elements will be cancelled. 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.
-A, --account=account Restrict the scancel operation to jobs under this charge account. -b, --batch Signal only the batch step (the shell script), but not any other steps nor any children of the shell script. This is useful when the shell script has to trap the signal and take some application defined action. This is not applicable if step_id 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. Also see the -f, --full option. --ctld Send the job signal request to the slurmctld daemon rather than directly to the slurmd daemons. This increases overhead, but offers better fault tolerance. This is the default behavior on architectures using front end nodes (e.g. BlueGene and Cray computers) or when the --clusters option is used. -f, --full Signal all steps associated with the job including any batch step (the shell script plus all of its child processes). By default, signals other than SIGKILL are not sent to the batch step. Also see the -b, --batch option. --help Print a help message describing all scancel options. -i, --interactive Interactive mode. Confirm each job_id.step_id before performing the cancel operation. -M, --clusters=<string> Cluster to issue commands to. -n, --jobname=job_name, --name=job_name Restrict the scancel operation to jobs with this job name. -p, --partition=partition_name Restrict the scancel operation to jobs in this partition. -q, --qos=qos Restrict the scancel operation to jobs with this quality of service. -Q, --quiet Do not report an error if the specified job is already completed. This option is incompatible with the --verbose option. -R, --reservation=reservation_name Restrict the scancel operation to jobs with this reservation name. -s, --signal=signal_name The name or number of the signal to send. If this option is not used the specified job or step will be terminated. Note. If this option is used the signal is sent directly to the slurmd where the job is running bypassing the slurmctld thus the job state will not change even if the signal is delivered to it. Use the scontrol command if you want the job state change be known to slurmctld. -t, --state=job_state_name Restrict the scancel operation to jobs in this state. job_state_name may have a value of either "PENDING", "RUNNING" or "SUSPENDED". -u, --user=user_name Restrict the scancel operation to jobs owned by this user. --usage Print a brief help message listing the scancel options. -v, --verbose Print additional logging. Multiple v's increase logging detail. This option is incompatible with the --quiet option. -V, --version Print the version number of the scancel command. -w, --nodelist=host1,host2,... 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. --wckey=wckey Restrict the scancel operation to jobs using this workload characterization key. ARGUMENTS job_id The Slurm job ID to be signaled. step_id 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 --batch nor --signal are used, the entire job will be terminated. When --batch 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 --batch is not used but --signal is used, then all job steps will be signalled, but the batch script itself will not be signalled.
Some scancel 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) SCANCEL_ACCOUNT -A, --account=account SCANCEL_BATCH -b, --batch SCANCEL_CTLD --ctld SCANCEL_FULL -f, --full SCANCEL_INTERACTIVE -i, --interactive SCANCEL_NAME -n, --name=job_name SCANCEL_PARTITION -p, --partition=partition_name SCANCEL_QOS -q, --qos=qos SCANCEL_STATE -t, --state=job_state_name SCANCEL_USER -u, --user=user_name SCANCEL_VERBOSE -v, --verbose SCANCEL_WCKEY --wckey=wckey SLURM_CONF The location of the Slurm configuration file.
If multiple filters are supplied (e.g. --partition and --name) only the jobs satisfying all of the filtering options will be signaled. Cancelling a job step will not result in the job being terminated. The job must be cancelled to release a resource allocation. To cancel a job, invoke scancel without --signal option. This will send first a SIGCONT to all steps to eventually wake them up followed by a SIGTERM, then wait the KillWait duration defined in the slurm.conf file and finally if they have not terminated send a SIGKILL. This gives time for the running job/step(s) to clean up. If a signal value of "KILL" is sent to an entire job, this will cancel the active job steps but not cancel the job itself. On Cray systems, all signals except SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, or SIGWINCH cause the ALPS reservation to be released. The job however will not be terminated except in the case of SIGKILL and may then be used for post processing.
When using the Slurm db, users who have AdminLevel's defined (Operator or Admin) and users who are account coordinators are given the authority to invoke scancel on other user's jobs.
Send SIGTERM to steps 1 and 3 of job 1234: scancel --signal=TERM 1234.1 1234.3 Cancel job 1234 along with all of its steps: scancel 1234 Send SIGKILL to all steps of job 1235, but do not cancel the job itself: scancel --signal=KILL 1235 Send SIGUSR1 to the batch shell processes of job 1236: scancel --signal=USR1 --batch 1236 Cancel job all pending jobs belonging to user "bob" in partition "debug": scancel --state=PENDING --user=bob --partition=debug Cancel only array ID 4 of job array 1237 scancel 1237_4
Copyright (C) 2002-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). Copyright (C) 2008-2011 Lawrence Livermore National Security. Copyright (C) 2010-2015 SchedMD LLC. This file is part of Slurm, a resource management program. For details, see <http://slurm.schedmd.com/>. 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. 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.
slurm_kill_job (3), slurm_kill_job_step (3)
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.