SCANCEL(1)

NAME
scancel - Used to signal jobs or job steps that are under the control of Slurm.

SYNOPSIS
scancel [OPTIONS...] [job_id[.step_id]] [job_id[.step_id]...]

DESCRIPTION
scancel 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.

OPTIONS

-b, --batch
    Signal the batch job shell and its child processes.

--help
    Print a help message describing all scancel options.

-i, --interactive
    Interactive mode. Confirm each job_id.step_id before performing the cancel operation.

-n, --name=job_name
    The name of jobs to be signaled.

-p, --partition=partition_name
    The name of the partition from which jobs are to be signaled.

-q, --quiet
    Do not report an error if the specified job is already completed. This option is incompatible with the --verbose option.

-s, --signal=signal_name
    The name or number of the signal to be send. Default value is "KILL".

-t, --state=job_state_name
    The state of the jobs are to be signaled. job_state_name may have a value of either "PENDING", "RUNNING" or "SUSPENDED".

-u, --user=user_name
    The name of the user whose jobs are to be signaled.

--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.

ARGUMENTS

job_id
    The Slurm job ID to be signaled. If no step_id is specified and the --batch option is not used, then all jobs steps associated with the provided job_id will be signaled. If no job steps are active then no processes will be signalled. Any batch script which spawned the job steps will only be signalled if the --batch option is used.

step_id
    The step ID of the job step to be signaled.

ENVIRONMENT VARIABLES

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_BATCH
    -b, --batch

SCANCEL_INTERACTIVE
    -i, --interactive

SCANCEL_NAME
    -n, --name=job_name

SCANCEL_PARTITION
    -p, --partition=partition_name

SCANCEL_STATE
    -t, --state=job_state_name

SCANCEL_USER
    -u, --user=user_name

SCANCEL_VERBOSE
    -v, --verbose

SLURM_CONF
    The location of the SLURM configuration file.

NOTES

If multiple filters are supplied (e.g. --partition and --name) only the jobs satisfying all of the filtering options will be signaled.

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.

Cancelling a job step will not result in a job being terminated. The job must be cancelled to release a resource allocation.

EXAMPLES

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

Cancel job all pending jobs belonging to user "bob" in partition "debug":
    scancel --state=PENDING --user=bob --partition=debug

COPYING
Copyright (C) 2002-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). UCRL-CODE-226842.

This file is part of SLURM, a resource management program. For details, see <http://www.llnl.gov/linux/slurm/>.

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.

SEE ALSO
slurm_kill_job(3), slurm_kill_job_step(3)