lsb_openjobinfo()

lsb_openjobinfo() takes the following arguments:

LS_LONG_INT  jobId;            Select job with the given job Id
char  *jobName;                Select job(s) with the given job name
char  *user;                   Select job(s) submitted by the named user
                                   or user group
char  *queue;                  Select job(s) submitted to the named queue
char  *host;                   Select job(s) that are dispatched to the
                                   named host
int   options;                 Selection flags constructed from the bits
                                   defined in lsbatch.h
options parameter
The options parameter contains additional job selection flags defined in lsbatch.h. These are:

Flag Name

Flag Description

ALL_JOB

Select jobs matching any status, including unfinished jobs and recently finished jobs. LSF batch remembers finished jobs within the CLEAN_PERIOD, as defined in the lsb.params file.

CUR_JOB

Return jobs that have not finished yet

DONE_JOB

Return jobs that have finished recently.

PEND_JOB

Return jobs that are in the pending status.

SUSP_JOB

Return jobs that are in the suspended status.

LAST_JOB

Return jobs that are submitted most recently.

JGRP_ARRAY_INFO

Return job array information.

If options is 0, then the default is CUR_JOB.

lsb_openjobinfo() returns the total number of matching job records in the connection. On failure, it returns -1 and sets lsberrno to indicate the error.