The user can control the hosts and daemons through lsb_hostcontrol() and lsb_reconfig().
lsb_hostcontrol() opens or closes a host and restarts or shutdowns the slave batch daemon.
int lsb_hostcontrol (struct hostCtrlReq *);struct hostCtrlReq { char *host; Host to be controlled int opCode; Option for host control char *message; Message attached by the admin};
If host is NULL, the local host is assumed.
lsbatch.h defines the opCode parameter containing the following control selection flags:
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.
MultiCluster — Closes a leased host on the submission cluster
In order to use updated batch LSF configuration files, the user can use lsb_reconfig() to restart the master batch daemon, mbatchd.
int lsb_reconfig (struct mbdCtrlReq *);struct mbdCtrlReq { int opCode; Options for configuration char *name; Reserved for future use char *message; Message attached by the admin };
The parameter opCode is defined in lsbatch.h and should be one of the following:
On success, both lsb_hostcontrol() and lsb_reconfig(). On failure, they return -1 and set lsberrno to indicate the error.