[Contents] [Prev]
[Title]
Appendix A. List of LSF API
Functions
This appendix lists all the LSF API functions for
your reference. Many of the functions listed below are not documented in
this guide, but are described in detail in the on-line man pages. See lslib(3)
and lsblib(3) for details of these functions.
LSLIB Functions
These are the function calls provided by the LSF
base system API. The function calls are listed by service categories.
Cluster Configuration Information
- struct lsInfo *ls_info(void)
- Get cluster-wide configuration information.
- char *ls_getclustername(void)
- Get the name of the local cluster.
- char *ls_getmastername(void)
- Get the name of the master host.
- float *ls_getmodelfactor(char *modelname)
- Get the CPU factor of the given host model.
- char *ls_gethosttype(char *hostname)
- Get the host type of the given host.
- char *ls_gethostmodel(char *hostname)
- Get the host model of the given host.
- float *ls_gethostfactor(char *hostname)
- Get the CPU factor of the given host.
- struct hostInfo *ls_gethostinfo(char *resreq,
int *numhosts,
char **hostlist, int listsize, int options)
- Get host related configuration information.
- int ls_readconfenv(struct config_param *paramList,
char *confPath)
- Get the variables defined in lsf.conf.
Load Information and Placement Advice
- struct hostLoad *ls_load(char *resreq, int *numhosts,
int options,
char *fromhost)
- Get load information of qualified hosts, simple version.
- struct hostLoad *ls_loadinfo(char *resreq, int
*numhosts,
int options, char *fromhost, char **hostlist, int listsize,
char ***indxnamelist)
- Get load information of qualified hosts, generic version.
- struct hostLoad *ls_loadofhosts(char *resreq,
int *numhosts,
int options, char *fromhost, char **hostlist, int listsize)
- Get load information of the qualified hosts from the given list of
hosts.
- struct hostLoad *ls_loadoftype(char *resreq,
int *numhosts,
int options, char *fromhost, char *hosttype)
- Get load information about hosts of the given host type.
- char **ls_placereq(char *resreq, int *numhosts,
int options,
char *fromhost)
- Get the best qualified hosts.
- char **ls_placeofhosts(char *resreq, int *numhosts,
int options,
char *fromhost, char **hostlist, int listsize)
- Get the best qualified hosts from the given list of hosts.
- char **ls_placeoftype(char *resreq, int *numhosts,
int options,
char *fromhost, char *hosttype)
- Get the best qualified hosts with the given host type.
- int ls_loadadj(char *resreq, struct placeInfo
*hostlist,
int listsize)
- Adjust the load of the given host(s).
Task List Manipulation
- char *ls_resreq(char *task)
- Get resource requirements of task in the remote task list.
- int ls_eligible(char *task, char *resreqstr,
char mode)
Get resource requirements of task in the task list indicated
by mode.
- int ls_insertrtask(char *task)
- Insert task into the remote task list.
- int ls_insertltask(char *task)
- Insert task into the local task list.
- int ls_deletertask(char *task)
- Remove task from the remote task list.
- int ls_deleteltask(char *task)
- Remove task from the local task list.
- int ls_listrtask(char ***taskList, int sortflag)
- Get all tasks in the remote task list.
- int ls_listltask (char ***taskList, int sortflag)
- Get all tasks in the local task list.
Remote Execution and Task Control
These functions are subject to the authentication
protocols described in 'Authentication'.
- int ls_initrex(int numPorts, int options)
- Initialize for remote execution or file operation.
- int ls_connect(char *hostname)
- Establish a connection with a remote RES.
- int ls_rexecv(char *host, char **argv, int
options)
- Remote execv(2). Execute argv on host with the
local environment.
- int ls_rexecve(char *host, char **argv, int
options, char **envp)
- Remote execve(2). Execute argv on host with
the given environment.
- int ls_rtask(char *host, char **argv, int options)
- Start argv on host with local environment.
- int ls_rtaske(char *host, char **argv, int
options, char **envp)
- Start argv on host with the given environment.
- int ls_rwait(LS_WAIT_T *status, int options,
struct rusage *ru)
- Remote wait(2).
- int ls_rwaittid(int tid, LS_WAIT_T *status,
int options,
struct rusage *ru)
- Remote waitpid(2).
- int ls_rkill(int tid, int sig)
- Remote kill(2).
- int ls_rsetenv(char *host, char **envp)
- Reset the environment for remote tasks on host.
- int ls_chdir(char *host, char *clntdir)
- Set the working directory for remote tasks on host.
- int ls_stoprex(void)
- Inform the NIOS to suspend itself and restore local tty settings.
Remote File Operation
These functions are subject to the authentication
protocols described in 'Authentication'.
- int ls_ropen (char *host, char *fn, int flags,
int mode)
- Remote open(2) on host.
- int ls_rclose(int rfd)
- Remote close(2) on host.
- int ls_rwrite(int rfd, char *buf, int len)
- Remote write(2) on host.
- int ls_rread(int rfd, char *buf, int len)
- Remote read(2) on host.
- off_t ls_rlseek(int rfd, off_t offset, int
whence)
- Remote lseek(2) on host.
- int ls_rfstat(int rfd, struct stat *buf)
- Remote fstat(2) on host.
- int ls_rstat(char *host, char *fn, struct stat
*buf)
- Remote stat(2) on host.
- int ls_getmnthost(char *file)
- Returns the host name of the file server for file.
- char *ls_rgetmnthost(char *host, char *file)
- Return the host name of the file server for file on host.
- int ls_rfcontrol(int command, int arg)
- Control the behavior of remote file operations.
Administration Operation
- int ls_lockhost(time_t duration)
- Set LIM status of the local host to 'locked' for duration seconds.
The application must be a setuid to root program to use this function.
- int ls_unlockhost(void)
- Cancel a previous lock operation. The application must be a setuid
to root program to use this function.
- int ls_limcontrol(char *hostname, int opCode)
- Perform a LIM administration operation as specified by opCode.
The application must be a setuid to root program to use this function.
- int ls_rescontrol(char *host, int opCode, int
options)
- Perform a RES administrative operation as specified by opCode.
The use of this function is subject to authentication protocols described
in 'Authentication'.
Error Handling
- void ls_perror(char *usrMsg)
- Print usrMsg followed by the LSLIB error message associated
with lserrno.
- char *ls_sysmsg(void)
- Return the LSLIB error message associated with lserrno.
- void ls_errlog(FILE *fp, const char *fmt, ...)
- Logging an LSLIB error message with time stamp.
Miscellaneous
- int ls_fdbusy(int fd)
- Test if a file descriptor fd is in use or reserved by LSF.
LSBLIB Functions
These are function calls provided by the LSF Batch
system API. The functions are listed by service categories.
Initialization
- lsb_init(char *appName)
- Initialize an LSF Batch application.
LSF Batch System Information
- struct groupInfoEnt *lsb_hostgrpinfo(char **groups,
int *numGroups,
int options)
- Get membership of the LSF Batch host groups.
- struct groupInfoEnt *lsb_usergrpinfo(char **groups,
int *numGroups,
int options)
- Get membership of the LSF Batch user groups.
- struct parameterInfo *lsb_parameterinfo(char
**names, int *numUsers,
int options)
- Get the LSF Batch cluster parameters.
- struct hostInfoEnt *lsb_hostinfo(char **hosts,
int *numHosts)
- Get information about the LSF Batch server hosts or host groups.
- struct userInfoEnt *lsb_userinfo(char **users,
int *numUsers)
- Get system information about the LSF Batch users and user groups.
- struct hostPartInfoEnt *lsb_hostpartinfo(char
**hostParts,
int *numHostParts)
- Get information about the LSF Batch host partitions.
- .struct queueInfoEnt *lsb_queueinfo(char **queues,
int *numQueues,
char *host, char *userName, int options)
- Get information about the LSF Batch queues.
Job Manipulation
These functions are subject to the authentication
protocols described in 'Authentication'.
- int lsb_submit(struct submit *jobSubReq,
struct submitReply *jobSubReply)
- Submit a job to the LSF Batch system.
- int lsb_modify(struct submit *jobSubReq,
struct submitReply *jobSubReply, int jobId)
- Change the attributes of an already submitted job.
- int lsb_signaljob(int jobId, int sigValue)
- Send job jobId signal sigValue.
- int lsb_chkpntjob (int jobId, time_t period,
int options)
- Checkpoint the job jobId.
- int lsb_deletejob (int jobId, int times, int
options)
- Delete a calendar-driven job.
- int lsb_mig(struct submig *mig, int *badHostIdx)
- Migrate a job from one host to another.
- int lsb_movejob(int jobId, int *position, int
opCode)
- Change the position of a pending job within its queue.
- int lsb_switchjob(int jobId, char *queue)
- Switch a job jobId to queue queue.
Job Information
- int lsb_openjobinfo(int jobId, char *jobName,
char *user,
char *queue, char *host, int options)
- Open a job information stream for the matching job(s) with mbatchd.
- struct jobInfoEnt *lsb_readjobinfo(int *more)
- Read a job record from the opened job information stream.
- void lsb_closejobinfo(void)
- Close a job information stream.
- char *lsb_suspreason(int reasons, int subreasons,
struct loadIndexLog *ld)
- Convert suspending reason codes into text.
- char *lsb_pendreason(int reasons, int subreasons,
struct loadIndexLog *ld)
- Convert pending reason codes into text.
- char *lsb_peekjob(int jobId)
- Get the name of the job's buffered output file. This function is subject
to the authentication protocols described in 'Authentication'.
Event File Processing
- struct eventRec *lsb_geteventrec(FILE *log_fp,
int *lineNum)
- Read an event record from the opened log file.
LSF Batch Administration
These functions are subject to the authentication
protocols described in 'Authentication'.
- int lsb_reconfig(void)
- Reconfigure the LSF Batch system using the current configuration files.
- int lsb_hostcontrol(char *host, int opCode)
- Open, close host for batch jobs, or restart, shut down sbatchd
on host.
- int lsb_queuecontrol(char *queue, int opCode)
- Change the status of an LSF Batch queue.
Calendar Manipulation
These functions can be used only if the LSF JobScheduler
component is enabled.
- int lsb_calendarop(int opCode, int numNames,
char **names,
char *desc, char *timeEvents, int options, char **badStr)
- Add, modify, or delete a calendar.
- struct calendarInfoEnt *lsb_calendarinfo(char
**calendars,
int *numCalendars, char *user)
- Get calendar information.
Error Handling
- void lsb_perror(char *usrMsg)
- Print the LSBLIB error message associated with lsberrno together
with usrMsg.
- char *lsb_sysmsg (void)
- Return the LSBLIB error message associated with lsberrno.
[Contents] [Prev]
[Title]
doc@platform.com
Copyright © 1994-1997 Platform Computing Corporation.
All rights reserved.