Knowledge Center Contents Previous Next |
lsb_openjobinfo()
Returns the number of jobs in the master batch daemon.
DESCRIPTION
lsb_openjobinfo() accesses information about pending, running and suspended jobs in the master batch daemon. Use lsb_openjobinfo() to create a connection to the master batch daemon. Next, use lsb_readjobinfo() to read job records. Close the connection using lsb_closejobinfo().
SYNOPSIS
#include <lsf/lsbatch.h> int lsb_openjobinfo(LS_LONG_INT jobId, char *jobName, char *userName, char *queueName, char *hostName, int options)PARAMETERS
lsb_openjobinfo() opens a connection with mbatchd and returns the total number of records in the connection on success.
jobId
Passes information about jobs with the given job ID. If jobId is 0, lsb_openjobinfo() looks to another parameter to return information about jobs. If a member of a job array is to be passed, use the array form jobID[ i ] where jobID is the job array name, and i is the index value.
jobName
Passes information about jobs with the given job name. If jobName is NULL, lsb_openjobinfo() looks to another parameter to return information about jobs.
userName
Passes information about jobs submitted by the named user or user group, or by all users if user is all. If user is NULL, lsb_openjobinfo() assumes the user is invoking this call.
queueName
Passes information about jobs belonging to the named queue. If queue is NULL, jobs in all the queues of the batch system are counted.
hostName
Passes information about jobs on the named host, host group or cluster name. If host is NULL, jobs on all hosts of the batch system will be considered.
options
<lsf/lsbatch.h> defines the following flags constructed from bits. Use the bitwise OR to set more than one flag.
ALL_JOB
Information about all jobs, including unfinished jobs (pending, running or suspended) and recently finished jobs. LSF remembers jobs finished within the preceding period. This period is set by the parameter CLEAN_PERIOD in the lsb.params file. The default is 3600 seconds (1 hour). (See lsb.params). The command line equivalent is bjobs -a.
DONE_JOB
Information about recently finished jobs.
PEND_JOB
Information about pending jobs.
SUSP_JOB
Information about suspended jobs.
CUR_JOB
Information about all unfinished jobs.
LAST_JOB
Information about the last submitted job.
RUN_JOB
Information about all running jobs
JOBID_ONLY
Information about JobId only.
HOST_NAME
Internal use only.
NO_PEND_REASONS
Exclude pending jobs.
JGRP_INFO
Information about job groups.
JGRP_RECURSIVE
Information about job group arrays.
JOB_ID_ONLY_ALL
Information about all jobs in the core.
ZOMBIE_JOB
Information about all zombie jobs.
TRANSPARENT_MC
Display remote jobs by submission jobid.
EXCEPT_JOB
Information about unfinished jobs that have triggered a job exception (overrun, underrun, idle).
MUREX_JOB
Information about all murex jobs.
TO_SYM_UA
Information about all jobs to Symphony UA.
SYM_TOP_LEVEL_ONLY
Internal use only.
JGRP_NAME
Information about job group structure.
COND_HOSTNAME
Uncondensed output for host groups. Option ignored in lsb_openjobinfo().
FROM_BJOBSCMD
Internal use only.
WITH_LOPTION
Internal use only.
APS_JOB
Jobs submitted to APS queue.
UGRP_INFO
Information about user group.
TIME_LEFT
Estimated time remaining based on the runtime estimate or runlimit.
FINISH_TIME
Estimated finish time based on the runtime estimate or runlimit.
COM_PERCENTAGE
Estimated completion percentage based on the runtime estimate or runlimit.
If options is 0, default to CUR_JOB.
RETURN VALUES
integer:value
The total number of records in the connection.
integer:-1
The function failed.
ERRORS
If the function fails, lsberrno is set to indicate the error.
SEE ALSO
Related APIs:
lsb_openjobinfo_a() - Provides the name and number of jobs and hosts in the master batch daemon
lsb_openjobinfo_a_ext() - Provides the name and number of jobs and hosts in the master batch daemon with additional host group information
lsb_openjobinfo_req() - Extensible API interface providing name, number of jobs and other information in the master batch daemon.
lsb_closejobinfo() - Closes a job information connection to the master batch daemon
lsb_readjobinfo() - Returns the next job information record in master batch daemon
lsb_readframejob() - Returns frame job information from the master batch daemon
Equivalent line command
bjobs
Files:
${LSF_ENVDIR}/lsf.conf
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |