Commands: LSF → SLURM¶
This page maps common LSF commands to their SLURM equivalents.
Command mapping table¶
| Action | LSF | SLURM | Notes |
|---|---|---|---|
| Submit a batch job | bsub < script.sh |
sbatch script.sh |
SLURM does not need input redirection |
| Interactive session | bsub -Is -q interactive bash |
srun --pty bash |
Add resource flags as needed |
| View job queue | bjobs |
squeue -u $USER |
|
| View all jobs | bjobs -a |
squeue |
|
| Detailed job info | bjobs -l <jobid> |
scontrol show job <jobid> |
|
| Cancel a job | bkill <jobid> |
scancel <jobid> |
|
| Cancel all my jobs | bkill 0 |
scancel -u $USER |
|
| Hold a job | bstop <jobid> |
scontrol hold <jobid> |
|
| Release a held job | bresume <jobid> |
scontrol release <jobid> |
|
| View cluster partitions | bqueues |
sinfo |
|
| View partition details | bqueues -l <queue> |
sinfo -p <partition> |
|
| Job history / accounting | bhist <jobid> |
sacct -j <jobid> |
|
| Past job efficiency | — | seff <jobid> |
SLURM-only; shows CPU/memory efficiency |
| View cluster load | lsload |
sinfo -N -l |
|
| Node status | bhosts |
sinfo -N |
|
| View job dependencies | bjobs -l <jobid> |
scontrol show job <jobid> |
Check Dependency field |
| Peek at job output | bpeek <jobid> |
Read the --output file directly |
No built-in equivalent |
| Modify pending job | bmod |
scontrol update job <jobid> |
Submitting jobs¶
No input redirection needed
In LSF you pipe the script into bsub with <. In SLURM you pass the script filename as an argument to sbatch. If you forget and use sbatch < script.sh, it will still work — but the standard form is sbatch script.sh.
Monitoring jobs¶
Job accounting¶
After a job completes, use sacct to review its resource usage:
# Basic accounting for a completed job
sacct -j 12345 --format=JobID,JobName,Partition,Elapsed,MaxRSS,State
# Quick efficiency summary
seff 12345
seff is your friend
seff <jobid> gives a quick summary of CPU and memory efficiency for completed jobs. Use it to right-size your future resource requests.