Knowledge Center Contents Previous Next |
lsb_hostcontrol()
Opens or closes a host, or restarts or shuts down its slave batch daemon.
DESCRIPTION
lsb_hostcontrol() opens or closes a host, or restarts or shuts down its slave batch daemon. Any program using this API must be setuid to root if LSF_AUTH is not defined in the lsf.conf file.
To restart the master batch daemon, mbatchd, in order to use updated batch LSF configuration files, use lsb_reconfig().
SYNOPSIS
#include <lsf/lsbatch.h> int lsb_hostcontrol (struct hostCtrlReq) struct hostCtrlReq { char *host; int opCode; char *message; };PARAMETERS
*host
The host to be controlled. If host is NULL, the local host is assumed.
opCode
One of the following:
HOST_CLOSE
Closes the host so that no jobs can dispatched to it.
HOST_OPEN
Opens the host to accept jobs.
HOST_REBOOT
Restart the sbatchd on the host. The sbatchd will receive a request from the mbatchd and re-execute itself. This permits the sbatchd binary to be updated. This operation will fail if no sbatchd is running on the specified host.
HOST_SHUTDOWN
The sbatchd on the host will exit.
*message
Message attached by the administrator.
RETURN VALUES
int:0
The function was successful.
int:-1
Function failed.
ERRORS
If the function fails, lsberrno is set to indicate the error.
SEE ALSO
Related APIs
lsb_reconfig()
Equivalent line command
none
Files
lsf.conf
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |