Knowledge Center Contents Previous Next |
ls_info()
Returns a pointer to an lsInfo structure.
DESCRIPTION
This routine provides access to LSF cluster configuration information.
On success, ls_info() returns a pointer to an lsInfo structure, which contains complete load sharing configuration information. This information includes the name of the cluster, the name of the current cluster master host, the set of defined resources, the set of defined host types and models, the CPU factors of the host models, and all load indices (resTable[0] through resTable[numIndx - 1]), including the site defined external load indices (resTable[MAX + 1] through resTable[MAX + numUsrIndx]).
The set of defined resource items is a list of all resources that may be assigned to various hosts in the cluster. The resource names can be used to build expressions for querying information about hosts, or for describing how tasks are to be scheduled. New resources may be defined as desired by the LSF administrator. See ls_task() for more information about how resource names can be used to describe resource requirements.
The valueType component of the resItem structure indicates whether the type of the resource is NUMERIC, STRING, or BOOLEAN.
The orderType indicates how hosts should be ordered from best to worst based on the resource. If the orderType is INCR, the hosts should be ordered from the lowest to the highest value for that resource; if DECR, they should be ordered from the highest to lowest. If the orderType is NA, then the resource cannot be used to order hosts.
The flags component is used to indicate the attributes of the resource. It is formed from the bitwise inclusive OR of zero or more of the following flags, as defined in <lsf/lsf.h>:
RESF_BUILTIN
Indicate whether this resource is builtin to LSF or configured by the LSF administrator (external).
RESF_DYNAMIC
Indicate whether the value of this resource can change dynamically or is static. Information about dynamic resources for a host can be retrieved through ls_load(). Information about static resources can be retrieved through ls_gethostinfo().
RESF_GLOBAL
Indicate whether the resource name is defined for every host in the cluster. The value of the resource is specific to each host. This type of resource is also called a non-shared resource.
RESF_SHARED
Indicate whether the resource is a shared resource. A shared resource is a resource whose value is shared by more than one host, and the resource may be defined only on a subset of the hosts.
The interval component applies to resources with dynamic values. It indicates how frequently (in seconds) the resource value is evaluated.
The set of host types hostTypes in the lsInfo structure is a list of all defined host architectures in the cluster. All machines that can run the same binaries are generally considered to be of the same host type.
The set of host models hostModels in lsInfo structure is a list of all defined computer models in the cluster. Generally, machines of the same host type that have exactly the same performance characteristics are considered to be the same model.
SYNOPSIS
#include <lsf/lsf.h> struct lsInfo *ls_info(void) struct lsInfo { int nRes; struct resItem *resTable; int nTypes; char hostTypes[MAXTYPES][MAXLSFNAMELEN]; int nModels; char hostModels[MAXMODELS][MAXLSFNAMELEN]; char hostArchs[MAXMODELS][MAXLSFNAMELEN_70_EP1]; int modelRefs[MAXMODELS]; float cpuFactor[MAXMODELS]; int numIndx; int numUsrIndx; }; struct resItem { char name[MAXLSFNAMELEN]; char des[MAXRESDESLEN]; enum valueType valueType; enum orderType orderType; int flags; int interval; }; enum valueType {LS_BOOLEAN, LS_NUMERIC, LS_STRING}; enum orderType {INCR, DECR, NA};RETURN VALUES
struct:
struct:NULL
ERRORS
If the function fails, lserrno is set to indicate the error.
SEE ALSO
Related APIs
ls_getclustername()
ls_getmastername()
ls_getmodelfactor()
Equivalent line command
none
Files
$LSF_CONFDIR/lsf.shared
$LSF_CONFDIR/lsf.cluster.cluster_name
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |