Skip to main content

bkill

Overview

bkill is a tool for terminating FSCHED jobs and provides an LSF-like command-line interface. It supports selectively terminating jobs using multiple filters (such as user, queue, host), and lets you specify the signal to send.


Available Options

OptionRequires ValueDescriptionNotes
-lNoList all supported signal names and exit.Only enumerates signals; does not terminate jobs.
-bNoForce fast termination (LSF-compatible behavior).In FSCHED, this forces SIGKILL instead of the default SIGTERM.
-C "reason"YesAdd a termination reason note. (Currently not implemented)The argument is silently ignored; FSCHED does not support this feature.
-J <job_name>YesTerminate jobs by exact job name match.Only exact matches are supported; no wildcards or fuzzy search.
-m <host_name>YesFilter jobs scheduled to the specified host/host group.Host name must match FSCHED configuration; otherwise the command exits with an error.
-q <queue_name>YesFilter jobs in the specified queue.Queue names are case-sensitive and must exist.
-s <signal_name>YesSpecify the termination signal (for example TERM, KILL).Only values defined in the Signals array are supported (for example TERM, KILL, INT); numeric or custom signals are not accepted.
-u <user_name>YesFilter jobs by user or user group.Use all to target all users; invalid users will cause the command to exit with an error.
-VNoShow version information and exit.No other side effects.

Common Examples

# Terminate all jobs for user alice (requires permission)
bkill -u alice

# Force-terminate jobs in queue gpu_queue
bkill -q gpu_queue -s KILL

# Terminate by exact job name "model_train"
bkill -J model_train

Notes

FSCHED vs LSF Differences

  1. -C is not supported: The LSF feature for recording notes is removed in FSCHED; input for this option is ignored.
  2. Signal behavior differs:
    • In LSF, -b may only send SIGTERM, but in FSCHED it forces SIGKILL (equivalent to kill -9).
    • The default signal is always SIGTERM (you can explicitly specify it with -s TERM).

Parameter Validation Rules

  • Filter combination: Multiple filters (for example -u alice -q gpu) are combined with logical AND; only jobs that match all conditions are terminated.
  • Permission checks: If -u is not specified and you do not have admin permissions, you can only terminate jobs owned by the current user.

Error Handling

  • If a parameter value is invalid (for example a non-existent queue name or signal name), the command fails and exits without performing any operation.
  • If the filters match zero jobs, a warning is printed but the exit code is still success.