Knowledge Center         Contents    Previous  Next    
Platform Computing Corp.

ls_lockhost()

Locks the local host for a specified number of seconds.

DESCRIPTION

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.

SYNOPSIS

#include <lsf/lsf.h> 
int ls_lockhost(time_t duration) 

PARAMETERS

duration

The number of seconds the local host is locked. 0 seconds locks a host indefinitely.

RETURN VALUES

integer:0

The function was successful.

integer:-1

The function failed.

ERRORS

On failure, lserrno is set to indicate the error. If the host is already locked, ls_lockhost() sets lserrno to LSE_LIM_ALOCKED.

SEE ALSO

Related APIs:

ls_limcontrol() - shuts down or reboots a host's LIM

ls_unlockhost() - unlocks a locked host

Equivalent line command

lsadmin limlock

Files:

${LSF_ENVDIR-/etc}/lsf.conf

$LSF_CONFDIR/lsf.shared

$LSF_CONFDIR/lsf.cluster.cluster_name


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