Knowledge Center Contents Previous Next |
ls_rescontrol()
Controls and maintains the Remote Execution Server.
DESCRIPTION
This library routine is used by the LSF administrator or authorized users to control and maintain the Remote Execution Server (RES).
SYNOPSIS
#include <lsf/lsf.h> int ls_rescontrol(char *host, int opCode, int data)PARAMETERS
*host
The host argument is used to specify the host name of the machine whose RES is to be operated upon.
opCode
The command is specified by the opCode argument and the data argument is used to supply an extra parameter for a particular opCode. The supported values are:
RES_CMD_REBOOT
Restart the RES. If the RES is in service, it will keep serving until all remote tasks exit, meanwhile starting another RES to serve new clients.
RES_CMD_SHUTDOWN
Shutdown the RES. The RES will not accept new tasks and will die after all current remote tasks exit.
RES_CMD_LOGON
Enable task logging, so that resource usage information can be logged to a file (see lsf.acct).
RES_CMD_LOGOFF
Disable task logging.
data
The data argument is optionally used with RES_CMD_LOGON to specify a CPU time threshold in msec, so that RES will log resource information only for tasks that consumed more than the specified CPU time.
RETURN VALUES
integer:0
Function was successful.
integer:-1
Function failed.
ERRORS
If the function fails, then lserrno is set to indicate the error. In particular, ls_rescontrol() will set lserrno to LSE_BAD_OPCODE if the opCode is not from the list above.
LSLIB calls for remote execution services
These routines allow programs to make use of LSF remote execution services. Such services include support for maintaining standard I/O transparency to and from remote machines, establishing, using, and terminating remote connections, transferring terminal and environment variable settings to remote processes, executing remote tasks and so on.
All rex routines require that the header <lsf/lsf.h> is included.
The following routines are supported:
ls_initrex()
Initiate remote execution
ls_connect()
Establish a remote connection
ls_isconnected()
Check for an established connection
ls_findmyconnections()
List hosts with open remote connections
ls_rexecv()
Remote execv
ls_rexecve()
Remote execve
ls_rtask()
Start a remote task
ls_rtaske()
Start a remote task with a new environment
ls_stdinmode()
Assign stdin to local or remote tasks
ls_getstdin()
List the remote task IDs that receive (or do not receive) standard input
ls_setstdin()
Specify how stdin is assigned to remote tasks.
ls_rwait()
Wait for a remote task to exit
ls_chdir()
Change the remote current working directory
ls_rsetenv()
Set environment on remote host
ls_rkill()
Kill a remote task
ls_donerex()
Restore terminal settings after remote execution
ls_fdbusy()
Test if a specified file descriptor is in use or reserved by LSF
ls_stoprex()
Stop the network I/O server
ls_conntaskport()
Connect to the remote task port.
LIMITATIONS
Although the level of transparency for remote execution in LSF is high, minor parts of the UNIX execution environment are not propagated to remote hosts. One such example is the UNIX process group.
SEE ALSO
Related APIs
none
Equivalent line command
none
Files
none
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |