Knowledge Center         Contents    Previous  Next    
Platform Computing Corp.

lslib

Application Programming Interface (API) library routines for LSF services

LSLIB routines allow application programs to contact the Load Information Manager (LIM) and Remote Execution Server (RES) daemons in order to obtain LSF services. These services include obtaining static system configuration information and dynamic load information for the hosts in distributed clusters, obtaining task placement advice from LIM, executing tasks (UNIX processes) on remote hosts with a high degree of transparency using RES, remote file operations across hosts that do not share file systems, performing remote terminal I/O and signal operations, and other related functions. You can build distributed applications on top of LSLIB to effectively exploit the resources available on the network, improving application performance and resource accessibility.

The LSLIB APIs are grouped by function on the following man pages:

ls_readconfenv()

Library API for reading the LSF configuration environment. The ls_readconfenv() API is documented on this page.

ls_info()

Library routines for obtaining load sharing cluster configuration information. The APIs documented on this page include:

ls_hostinfo()

Library routines for obtaining host configuration information. The APIs documented on this page include:

ls_load()

Library routines for obtaining host load information. An application can use this information to make task placement decisions instead of using LIM's. The APIs documented on this page include:

ls_policy()

Library routines implementing LIM's task placement policy. These routines include calls to obtain task placement information, and calls to adjust host load measures. The APIs documented on this page include:

ls_task()

Library routines for displaying and manipulating the local and remote task lists. These lists specify the eligibility of various types of tasks for remote execution, and their resource requirement characteristics. The APIs documented on this page include:

REMOTE EXECUTION

Library routines related to remote execution, including initiation, connection and remote environment manipulation. There are a number of manual pages that describe remote execution calls:

ls_initrex()

Library routine for initializing an LSF application for remote execution. The APIs documented on this page is:

ls_connect()

Library routines for establishing and querying remote connections. The APIs documented on this page include:

ls_rexecv()

Library routines for executing remote tasks. The APIs documented on this page include:

ls_stdinmode()

Library routines for querying and manipulating stdin for remote tasks. The APIs documented on this page include:

ls_rwait()

Wait for a remote or local task, then return its status. The routines documented on this page include:

ls_chdir()

Set the remote current working directory.

ls_rsetenv()

Set up a remote task environment.

ls_rkill()

Send a signal to a remote task.

ls_donerex()

Clean up before closing a remote connection.

ls_fdbusy()

Check if a file descriptor is claimed by LSF.

ls_stoprex()

Stop the network I/O server and restore local tty settings.

ls_conntaskport()

Get a socket connected to a remote task port.

ls_rfs()

Library routines for operations on files on remote hosts. The APIs documented on this page include:

ls_perror()

Library routine for load sharing error messages. The routines documented on this page are:

ls_admin()

Library routines for administering and controlling the LSF system. The APIs documented on this page include:

ls_rescontrol()

Remote Execution Server control.

ls_readrexlog()

Read a record from the remote executed task log file.

ls_getmnthost()

Get the name of the host that exports a file system.

ls_getmyhostname()

Deprecated. Get the name used throughout LSF to represent the local host.

ls_getmyhostname2()

Replaces ls_getmyhostname(). Get the name used throughout LSF to represent the local host.

NOTES

All LSLIB routines require that the LSF header file <lsf/lsf.h> be included.

Many LSLIB APIs return a pointer to an array or structure. These data structures are in static storage or on the heap. The next time the routine is called, the storage is overwritten or freed.

Any program using LSLIB routines that change the state of the LSF system (that is, those routines documented in ls_admin() and ls_rex()) must be setuid to root if LSF_AUTH is not defined in the lsf.conf file.

Any program using LSLIB routines documented in the ls_rex() or ls_rfs() man pages must call ls_initrex() before calling any of the other routines.

On systems which have both System V and BSD programming interfaces, LSLIB typically requires the BSD programming interface. On System V-based versions of UNIX, for example SGI IRIX, it is normally necessary to link applications using LSLIB with the BSD compatibility library.

On AFS systems, the following needs to be added to the end of your linkage specifications when linking with LSLIB (assuming your AFS library path is /usr/afsws):

For HP-UX and Solaris,

-lc -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp /usr/afsws/lib/afs/util.a

For other platforms,

-lc -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp

FILES

${LSF_ENVDIR-/etc}/lsf.conf

$LSF_CONFDIR/lsf.shared

$LSF_CONFDIR/lsf.cluster.cluster_name

$LSF_CONFDIR/lsf.task

$LSF_CONFDIR/lsf.task.cluster_name

SEE ALSO

ls_readconfenv(), ls_info(), ls_hostinfo(), ls_load(), ls_policy(), ls_task(), ls_rex(), ls_initrex(), ls_connect(), ls_rexecv(), ls_stdinmode(), ls_rwait(), ls_chdir(), ls_rsetenv(), ls_rkill(), ls_donerex(), ls_fdbusy(), ls_stoprex(), ls_rfs(), ls_perror(), ls_admin(), ls_rescontrol(), lim, res, nios


Platform Computing Inc.
www.platform.com
Knowledge Center         Contents    Previous  Next