IBM

ls_load

This routine returns the dynamic load information of qualified hosts.

ls_load returns all load indices. The result of this call is an array of hostLoad data structures as defined in <lsf/lsf.h>. The status component of the hostLoad structure is an array of integers. The high order 16 bits of the first int are used to mark the operation status of the host. Possible states defined in <lsf/lsf.h> are as follows: status_ls_load.

The low order 16 bits of the first int are reserved. The other int() of the status array is used to indicate the load status of the host. If any of these bits is set, then the host is considered to be busy (overloaded). Each bit (starting from bit 0) in int() represents one load index that caused the host to be busy. If bit i is set then the load index corresponding to li[i] caused the host to be busy. An int can be used to for 32 load indices. If number of load indices on the host, both built-in and user defined, are more than 32, more than one int will be used.

Programmers can use macros to test the status of a host. The most commonly used macros include:

In the hostLoad data structure, the li vector contains load information on various resources on a host. The elements of the load vector are determined by the namelist parameter.

#include <lsf/lsf.h>

struct hostLoad *ls_load(char *resreq, int *numhosts, int options, char *fromhost)

Parameters:
*resreq resreq is a char string describing resource requirements. Only the load vectors of the hosts satisfying the requirements will be returned. If resreq is NULL, the load vectors of all hosts will be returned.
*numhosts numhosts is the address of an int which initially contains the number of hosts requested. If *numhosts is 0, request information on as many hosts as satisfy resreq. If numhosts is NULL, requests load information on one (1) host. If numhosts is not NULL, then *numhosts will contain the number of hostLoad records returned on success.
options options is constructed from the bitwise inclusive OR of zero or more of the following flags, as defined in <lsf/lsf.h>: options_ls_load.
*fromhost fromhost is the name of the host from which a task might be transferred. This parameter affects the host selection in such a way as to give preference to fromhost if the load on other hosts is not much better. If fromhost is NULL, the local host is assumed.
Data Structures:
hostLoad
Define Statements:
status_ls_load
options_ls_load
Returns:
struct hostLoad *:An array of hostLoad struct containing load information.
Function was successful.

NULL
Function failed.

Errors:
Systems that conform to the Single UNIX specification are not required to detect error conditions for this function.
Equivalent line commands:
none
Files:
$LSF_CONFDIR/lsf.shared
$LSF_CONFDIR/lsf.cluster.cluster_name
See also:
ls_loadinfo

ls_loadofhosts



     
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.