bstop, bresume, bkill - suspend, resume, or send a signal to one or more unfinished batch jobs
bstop [ -h ] [ -V ] [ -q queue_name ] [ -m host_name ] [ -u user_name | all
]
[ -J job_name ] [ jobId ... ]
bresume [ -h ] [ -V ] [ -q queue_name ] [ -m host_name ] [ -u user_name
all ]
[ -J job_name ] [ jobId ... ]
bkill [ -h ] [ -V ] [ -l ] [ -s signal_value | signal_name ] [ -q
queue_name ]
[ -m host_name ] [ -u user_name | all ] [ -J job_name ] [ jobId ... ]
Suspend, resume, or send a signal to one or more unfinished batch jobs. The suspending and resuming batch job operations performed by bstop and bresume can also be performed by bkill using the proper signal specified by the option -s. If the option -s is not present, the default operation of bkill is to send the SIGKILL signal to the specified jobs to kill these jobs. A user can only operate on his or her own jobs. Only root and LSF administrator can operate on jobs submitted by other users.
-h Print command usage to stderr and exit.
-V Print LSF release version to stderr and exit.
-l Available to bkill only. Display a set of signal names supported by bkill. Note that this is a subset of those supported by /bin/kill and is platform dependent.
-s signal_value or signal_name
This option is available to bkill only. Send the signal specified by
signal_value or signal_name to the specified jobs. The eligible signal
names are listed by bkill -l. The default is to send the SIGKILL signal
to the jobs. If the SIGKILL signal is specified, SIGTERM and
SIGINT are first sent to the job, followed by SIGKILL if the job process
has not yet terminated.
-q queue_name
Operate only on those jobs in the queue specified by queue_name (see
bqueues(1)
). If jobId is not specified, only the most recently submitted
qualifying job is operated upon. The -q option is ignored if a
job ID other than 0 is specified in the jobId option.
-m host_name
Operate only on those jobs dispatched to the host or host group that
is specified by host_name (see bhosts(1)
and bmgroup(1)
). If jobId is
not specified, only the most recently submitted qualifying job is
operated upon. The -m option is ignored if a job ID other than 0 is
specified in jobId option.
-u user_name | all
Operate on the jobs submitted either by the user or user group (see
bugroup(1)
) that is specified by user_name, or by all users if the
reserved user name all is given. If jobId is not specified, only the
most recently submitted qualifying job is operated upon. The -u
option is ignored if a job ID other than 0 is specified in the jobId
option.
-J job_name
Operate on the jobs that have the specified job_name. If jobId is not
specified, only the most recently submitted qualifying job is operated
upon. The -J option is ignored if a job ID other than 0 is specified
in the jobId option.
jobId ...
Operate only on those jobs that are specified by jobId. Jobs submitted
by any user can be specified here without using the -u option. If
you use the reserved job ID 0, the operation is applied to all the
jobs that satisfy other options (that is, -m, -q, -u and -J, see previous
sections), and all other job IDs are ignored. The options -u,
-q, -m and -J have no effect if a job ID other than 0 is specified.
If no jobId is specified, the job that satisfies all the other
options, and was submitted most recently, is operated upon. Job IDs
are returned at job submission time (see bsub(1)
) and may be obtained
with the bjobs command (see bjobs(1)
).
The bstop command is equivalent to `bkill -s 18' or `bkill -s 21', depending on your system's definition of the SIGTSTP signal.
The bresume command is equivalent to `bkill -s 19' or `bkill -s 28', depending on your system's definition of the SIGCONT signal.
You cannot suspend a job that is already suspended, or resume a job that is not suspended. In terms of the job states described in bjobs(1) , using bstop on a job that is in the USUSP state has no effect and using bresume on a job that is not in either the PSUSP or the USUSP state has no effect.
If a signal request fails to reach the job execution host, lsbatch will retry the operation later when the host becomes reachable. lsbatch retries the most recent signal request.
For a description of the possible states for batch jobs, see bjobs(1) and the LSF User's Guide.
% bkill
Kill the last job submitted by the invoker.
% bstop 314
Suspend job number 314.
% bresume -q night 0
Resume all of the invoker's suspended jobs that are in queue night.
% bkill -s 17 -q night
Send signal 17 to the last job that was submitted by the invoker to
queue night.
% bstop -m apple
Suspend the invoker's last job that was dispatched to host apple.
% bstop -u smith 0
Suspend all the jobs submitted by user smith.
% bkill -q short -u all 0
Kill all the jobs that are in the queue short.
% bstop -u all
Suspend the last submitted job in the lsbatch system.
% bstop -u all 0
Suspend all the batch jobs in the lsbatch system.
% bresume -m orange 0
Resume all the invoker's jobs that were dispatched to host orange and
are suspended.
bsub(1) , bjobs(1) , bqueues(1) , bhosts(1) , bugroup(1) , mbatchd(8) , kill(1) , signal(2)