← 返回命令列表

Linux command

bkill 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Kill a specific job

bkill [job_id]

Kill all your jobs

bkill 0

Kill a job by name

bkill -J [job_name]

Kill jobs in a specific queue

bkill -q [queue_name] 0

Force kill a job

bkill -r [job_id]

Send a specific signal

bkill -s [SIGTERM] [job_id]

Kill jobs matching a pattern

bkill -J "[pattern*]" 0

Kill job array elements

bkill "[job_id][1-10]"

说明

bkill terminates LSF (Load Sharing Facility) batch jobs. It sends a signal to running jobs or removes pending jobs from the queue. Using job ID 0 targets all of your own jobs. For running jobs, bkill first sends SIGINT, waits for a grace period, then sends SIGTERM, and finally SIGKILL if the job doesn't terminate. The -r option skips this sequence and forces immediate removal. bkill is part of IBM Spectrum LSF workload management system used in HPC environments.

参数

-r
Force removal: remove the job from LSF immediately, mark it EXIT, and release monitored resources. Cannot be combined with -s.
-s _signal_
Send a specific signal by name or number instead of the default SIGINT/SIGTERM/SIGKILL sequence.
-J _name_
Kill jobs matching name or name pattern.
-q _queue_
Kill jobs in specific queue.
-m _host_
Kill jobs on specific host or host group.
-g _group_
Kill jobs in specific job group.
-u _user_
Kill jobs for specific user or user group (admin only).
-app _profile_
Kill jobs using specific application profile.
-sla _class_
Kill jobs belonging to a specific service class.
-b
Kill jobs quickly; pending jobs are removed immediately without waiting.
-l
Display the signal names supported by bkill on this platform.
-V
Display LSF version information.
0
Target all of your jobs (combine with filters to scope by queue, host, etc.).

FAQ

What is the bkill command used for?

bkill terminates LSF (Load Sharing Facility) batch jobs. It sends a signal to running jobs or removes pending jobs from the queue. Using job ID 0 targets all of your own jobs. For running jobs, bkill first sends SIGINT, waits for a grace period, then sends SIGTERM, and finally SIGKILL if the job doesn't terminate. The -r option skips this sequence and forces immediate removal. bkill is part of IBM Spectrum LSF workload management system used in HPC environments.

How do I run a basic bkill example?

Run `bkill [job_id]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r do in bkill?

Force removal: remove the job from LSF immediately, mark it EXIT, and release monitored resources. Cannot be combined with -s.