Platform LSF Administrator's Primer Version 6.2

Chapter 2
Working with LSF
Platform LSF Administrator’s Primer
27
To submit a batch interactive job by using a pseudo-terminal, use the bsub -Ip option.
To submit a batch interactive job and create a pseudo-terminal with shell mode support,
use the
bsub -Is option.
Displaying job status (bjobs)
The status of each LSF job is updated periodically, and you can use the job ID to
monitor and manipulate the job status.
bjobs
The bjobs command displays the job ID and other job status. For example:
% bjobs
JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME
1266 user1 RUN normal hosta hostb sleep 60 Jun
5 17:39:58
If all hosts are busy, the job is not started immediately and the STAT column says PEND.
The job
sleep 60 should take 60 seconds to run. When the job completes, LSF sends
email reporting the job completion.
Controlling job execution (bstop, bresume, bkill)
bstop
To suspend a running job, use the bstop command and specify the job ID:
% bstop 1266
Job <1266> is being stopped
If the job was running when it was stopped, the bjobs command shows USUSP status
for job
1266:
% bjobs
JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME
1266 user1 USUSP normal hosta hostb sleep 60 Jun
5 17:39:58
Job owners can only suspend their own jobs. LSF administrators can suspend any job.
bresume
To resume a suspended job, use the bresume command.
% bresume 1266
Job <1266> is being resumed
If the job resumes immediately. the bjobs command shows RUN status for job 1266:
% bjobs
JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME
1266 user1 RUN normal hosta hostb sleep 60 Jun
5 17:39:58
Job owners can only resume their own jobs. LSF administrators can resume any job.
bkill
To kill a job, use the bkill command, which sends a signal to the specified jobs. For
example, if the job owner or the LSF administrator runs the following command, job
1266 is killed:
% bkill 1266
Job <1266> is being terminated