IBM

ls_gethostinfo

Returns an array of hostInfo data structures.

This routine obtains static resource information about hosts. Static resources include configuration information as determined by LSF configuration files (see lsf.shared and lsf.cluster) as well as others determined automatically by LIM at start up.

ls_gethostinfo returns an array of hostInfo data structures, as defined in <lsf/lsf.h>. Each entry contains information about one host, including the host type, the host model, its CPU normalization factor, the number of CPUs, its maximum memory, swap and tmp space, number of disks, the resources available on the host, the run windows during which the host is available for load sharing, the busy thresholds for the host, whether the host is a LSF server, and the default priority used by the RES for remote tasks executing on that host. The windows field will be set to "-" if the host is always open. The busyThreshold field is an array of floating point numbers specifying the load index thresholds that LIM uses to consider a host as busy. The size of the array is indicated by the numIndx field. The order of the array elements is the same as the load indicies returned by ls_load.

This routine returns a pointer to dynamically allocated data structures which can be freed in subsequent calls.

#include <lsf/lsf.h>
struct hostInfo *ls_gethostinfo(char *resreq, int *numhosts, char **hostlist, int listsize, int options)

Parameters:
*resreq resreq specifies resource requirements that a host must satisfy if it is to be included in the hostInfo array returned. See Administering IBM Platform LSF for information about resource requirement string syntax. If this parameter is a NULL pointer or is an empty string, then the default resource requirement will be used, which is to return all hosts.
*numhosts numhosts is the address of an int which, if it is not NULL, will contain the number of hostInfo records returned on success.
**hostlist hostlist gives a list of hosts or clusters whose information is returned if they satisfy the requirements in resreq. If hostlist is NULL, all hosts known to LSF that satisfy the requirements in resreq are returned.
listsize listsize gives the size of the hostlist.
options options is constructed from the bitwise inclusive OR of zero or more of the flags that are defined in <lsf/lsf.h>. These flags are documented in ls_load.
Data Structures:
hostInfo
Define Statements:
defs_ls_lic
Returns:
struct hostInfo *:A list of hostInfo struct.
Function successful.

NULL
Function failed.

Errors:
If the function fails, lserrno is set to indicate the error.
Equivalent line commands:
none
Files:
$LSF_CONFDIR/lsf.shared
$LSF_CONFDIR/lsf.cluster.cluster_name
See also:
ls_gethosttype

ls_gethostmodel

ls_gethostfactor

ls_load



     
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.