Kill multiple jobs

Procedure

Run bkill 0 to kill all pending jobs in the cluster or use bkill 0 with the -g, -J, -m, -q, or -u options to kill all jobs that satisfy these options.

The following command kills all jobs dispatched to the hostA host:

bkill -m hostA 0
Job <267> is being terminated
Job <268> is being terminated
Job <271> is being terminated

The following command kills all jobs in the groupA job group:

bkill -g groupA 0
Job <2083> is being terminated
Job <2085> is being terminated

Kill a large number of jobs rapidly

About this task

Killing multiple jobs with bkill 0 and other commands is usually sufficient for moderate numbers of jobs. However, killing a large number of jobs (approximately greater than 1000 jobs) can take a long time to finish.

Procedure

Run bkill -b to kill a large number of jobs faster than with normal means. However, jobs that are killed in this manner are not logged to lsb.acct.

Local pending jobs are killed immediately and cleaned up as soon as possible, ignoring the time interval that is specified by CLEAN_PERIOD in lsb.params. Other jobs are killed as soon as possible but cleaned up normally (after the CLEAN_PERIOD time interval).

If the -b option is used with bkill 0, it kills all applicable jobs and silently skips the jobs that cannot be killed.

The -b option is ignored if used with -r or -s.