Get Services >  High Performance Computing >  How to Run Batch Job >  Job Monitoring and Management

Check Batch Jobs

To check and list your submitted batch jobs, use the bjobs command:

  > bjobs

Example output:

JOBID USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
21481 ccev55  RUN   linux64    atlas3-c01  atlas2-c10  ./a.out    Oct 11 14:20

The STAT field shows the status of the job and can be one of the following values:

  • PEND: the job is pending in the queue
  • RUN: the job has been launched and is running on a system or a group of systems
  • SSUSP: the job has been automatically suspended by the system (and will be automatically be resumed when favorable conditions return)
  • USUSP: the job has been suspended by the owner or administrator via the bstop command (bresume resumes that job)
  • PSUSP: the job has been suspended by the owner or administrator while pending.

There may be many reasons why a job is in a status other than RUN. Normally, you should wait a while to see if conditions changed. Otherwise, contact HPC team at for further investigation.

You may also want to check the basic job submission requirements are met. The PEND reason can be checked via command:

  > bjobs –p jobid

Replace “jobid” in the above command line with the actual jobid that is in numeric digits.


Check Progress of a Job

To "peek" the progress of a batch RUN job, use command bpeek. For example, to check the job progress for the job with jobid=4321:

  > bpeek 4321

This may not always show you the most current results due to file buffering. In addition, if your program write a lot of messages to screen (stdout message), you can pipe the message with less to check:

  > bpeek 4321 | less
 

When a job is done or exited, you can’t bpeek it. Instead you can check the job information at the output file if you specified it via “-o” with bsub command.


Job Termination, Suspend and Resume

To terminate a job(e.g. jobid=4321), use command bkill:

  > bkill 4321

To suspend a job, use command bstop:

  > bstop 4321

And to resume a suspended job, use command bresume:

  > bresume 4321
top