ls_lockhost
Locks the local host for a specified number of seconds.ls_lockhost prevents a host from being selected by the master LIM for task or job placement. If the host is locked for 0 seconds, it remains locked until it is explicitly unlocked by ls_unlockhost. Indefinitely locking a host is useful if a job or task must run exclusively on the local host, or if machine owners want private control over their machines.
A program using ls_lockhost must be setuid to root in order for the LSF administrator or any other user to lock a host.
To lock a host, use the setuid function (int setuid(uid_t uid)) to set the effective user id of the calling process to root or LSF administrator. On success, this API changes the status of the local host to indicate that it has been locked by the user.
#include <lsf/lsf.h>
int ls_lockhost(time_t duration)
Data Structures:
- Parameters:
duration The number of seconds the local host is locked. 0 seconds locks a host indefinitely. Define Statements:
- none
- none
Errors:
- Returns:
- int:0
The function was successful.int:-1
The function failed.Equivalent line commands:
- On failure, lserrno is set to indicate the error. If the host is already locked, ls_lockhost sets lserrno to LSE_LIM_ALOCKED.
Files:
- lsadmin limlock
- ${LSF_ENVDIR:-/etc}/lsf.conf
$LSF_CONFDIR/lsf.shared
$LSF_CONFDIR/lsf.cluster.cluster_name
- See also:
- ls_limcontrol
Date Modified: 16 Jul 2014
Terms of Use
Copyright © 1994-2014 International Business Machines Corp.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.