Skip to main content

bjobs


Overview

bjobs is a job status query tool for FSCHED, compatible with LSF bjobs syntax. It lets users filter jobs and customize output format.


Parameters

Supported Options

OptionDescriptionKey Differences
-AShow job array summary informationNo difference
-aShow jobs in all states (including recently completed jobs)Default cleanup time for completed jobs differs: LSF 1 hour, FSCHED 900 seconds
-dShow recently completed jobsDefault cleanup time for completed jobs differs: LSF 1 hour, FSCHED 900 seconds
-GShow jobs for the specified user groupNo difference
-JShow jobs or job arrays with the specified nameNo difference
-JdShow jobs with the specified descriptionNo difference
-lLong format with detailed job information (multi-line output)Details listed in later sections
-mShow jobs dispatched to the specified hostNo difference
-noheaderRemove column headers from outputNo difference
-oSet a custom output formatDetails listed in later sections
-PShow jobs for the specified projectNo difference, project maps to wckey
-pShow pending jobs and reasons they are not dispatchedNo difference
-qShow jobs in the specified queueNo difference
-rShow running jobsNo difference
-sShow suspended jobs and suspension reasonsCan filter suspended jobs; suspension reason may show None
-UFShow unformatted detailed job informationNo difference
-uShow jobs submitted by a specified user or all usersSupports specific users and all, not user groups
-wWide format (do not truncate fields)No difference
-jsonShow output in JSON formatNo difference
job_idSpecify a job or job array to displayDefault cleanup time for completed jobs differs: LSF 1 hour, FSCHED 900 seconds
-hShow help informationProvides more detailed help information
-VPrint LSF versionNo difference

Default Output Fields

FieldDescriptionKey Differences
JOBIDJob IDNo difference
USERUser who submitted the jobNo difference
STATJob statusUSUSP and SSUSP distinction may differ; no UNKWN, WAIT, ZOMBI states
QUEUEQueue nameNo difference
FROM_HOSTSubmit hostNo difference
EXEC_HOSTExecution hostNo difference
JOB_NAMEJob nameNo difference
SUBMIT_TIMESubmit timeNo difference

Output Fields for -l

FieldDescriptionKey Differences
JobJob ID assigned by LSFNo difference
UserUser who submitted the jobNo difference
ProjectProject for the jobNo difference, project maps to wckey
CommandCommand executed by the jobNo difference
CWDWorking directory on the submission hostNo difference
Execution CWDActual working directory during job executionNo difference
Migration thresholdMigration threshold specified via bsub -migNo difference
PENDING REASONSReasons the job is in PEND or PSUSP stateShows simplified reasons
SUSPENDING REASONSReasons the job is in USUSP or SSUSP stateShows simplified reasons
loadSchedJob load scheduling thresholdNo difference
loadStopJob load suspension thresholdNo difference
JOB STATUSJob statusUSUSP and SSUSP distinction may differ; no UNKWN, WAIT, ZOMBI states
RESOURCE USAGEResource usageCPU time, MEM, NTHREAD, PGID, PIDS implemented; SWAP not implemented
Requested resourcesResource requirement string specified in bsubrusage[mem=xxx] implemented; others not implemented
JOB_DESCRIPTIONUser-provided job descriptionNo difference
MEMORY USAGEMemory usage detailsMAX MEM and AVG MEM implemented. MAX MEM is the max across nodes, AVG MEM averages node memory and task counts
RESOURCE REQUIREMENT DETAILSResource request detailsrusage[mem=xxx] implemented; shows dummy select[type == local] order[r15s:pg]; others not implemented
SCHEDULING PARAMETERSLoad threshold informationShows only queue thresholds, not host thresholds. Implements r15s, r1m, r15m, ut, mem; not implemented: pg, io, ls, it, tmp, swp

Output Fields for -A

FieldDescriptionKey Differences
JOBIDJob ID for the job arrayNo difference
ARRAY_SPECJob array description in name[index] formatNo difference
OWNERJob array ownerNo difference
NJOBSTotal number of jobs in the arrayNo difference
PENDNumber of jobs in PEND state in the arrayNo difference
RUNNumber of jobs in RUN state in the arrayNo difference
DONENumber of jobs successfully completed in the arrayNo difference
EXITNumber of jobs that exited abnormally in the arrayNo difference
SSUSPNumber of system-suspended jobs in the arrayDummy value is 0
USUSPNumber of user-suspended jobs in the arrayCounts all suspended jobs
PSUSPNumber of paused jobs in the arrayDummy value is 0

Custom Format (-o option)

With -o, you can customize fields, alignment, width, and delimiter. Syntax example:

Syntax:

[field_name[:[-]width][:unit_prefix]] [delimiter="delimiter"]

Examples:

  1. Basic format:
    bjobs -o "jobid job_name stat"
  2. Width and alignment:
    # Right alignment (default), left alignment (with `-`), and fixed width
    bjobs -o "jobid:10 stat:-5 user:8"
  3. Custom delimiter:
    bjobs -o "jobid description delimiter=, submit_time"

Supported Fields and Aliases:

FieldAliasDescription
jobididUnique job identifier.
job_descriptiondescriptionJob description text (optional).
statCurrent state (such as RUN, PEND, EXIT).
userSubmitting user name.
exec_hostAllocated compute node list (suspended jobs show -).
job_nameJob name.
queueQueue name.
from_hostSubmission workstation host name.
commandLaunched command (optional).
submit_timeSubmit time (format: YYYY-MM-DD HH:MM).
start_timeJob start time (format: YYYY-MM-DD HH:MM).
finish_timeJob finish time (format: YYYY-MM-DD HH:MM).
run_timeElapsed run time (seconds; completed jobs show 0).
nalloc_slotAllocated CPU cores.
cpu_exec_hostHost and allocated core format (such as 2*hostA,1*hostB).
accountJob account information.
requeueWhether the job can be requeued.
tmp_diskTemporary disk space requirement (MB).
min_nodesMinimum node count.
max_nodesMaximum node count.
ntasks_per_nodeTasks per node.

Notes:

  • Field name sensitivity: Field names are case-insensitive but must match the list.
  • Wildcard handling: Only -J and -Jd support the * wildcard (automatically converted to regex).
  • Unit prefix: Automatic unit conversion (such as KB/MB) is not implemented; values are shown as-is.

Unsupported LSF Features

The following parameters are not available in the FSCHED version:

ParameterReason
-NNormalized CPU time cannot be calculated.
-W, -WF, -WL, -WPResource usage and progress estimation are not supported.

Examples

  1. Show all jobs (including completed)

    bjobs -a
  2. Filter jobs by user group

    bjobs -G developers
  3. Custom output format (pipe delimiter)

    # Show ID, name, status, and submit time, separated by `|`:
    $ bjobs -o "jobid job_name stat submit_time delimiter='|'"
  4. Filter by user and suppress headers

    bjobs -u alice -noheader
  5. Show suspended jobs and reasons (wide format)

    bjobs -p -w

Notes

  1. Parameter conflict rules: Format options -l, -o, -UF, and -w are mutually exclusive and cannot be used together. User filters -G and -u cannot be combined.

  2. User and group validation: The specified user or group name must exist (except for -u all). Invalid names will result in an error.

  3. Wildcard rules: In -J or -Jd, entering *test matches any job name/description containing test.

  4. Alternatives for unimplemented features: For resource statistics, use FSCHED built-in commands (such as squeue --Format=...).