Knowledge Center Contents Previous Next |
lsb_hostinfo()
Returns information about job server hosts.
DESCRIPTION
lsb_hostinfo() returns information about job server hosts.
The hostInfoEnt structure contains the following fields:
SYNOPSIS
#include <lsf/lsbatch.h> struct hostInfoEnt *lsb_hostinfo(char **hosts, int *numHosts) struct hostInfoEnt { char *host; int hStatus; int *busySched; int *busyStop; float cpuFactor; int nIdx; float *load; float *loadSched; float *loadStop; char *windows; int userJobLimit; int maxJobs; int numJobs; int numRUN; int numSSUSP; int numUSUSP; int mig; int attr; float *realLoad; int numRESERVE; int chkSig; float cnsmrUsage; float prvdrUsage; float cnsmrAvail; float prvdrAvail; float maxAvail; float maxExitRate; float numExitRate; char *hCtrlMsg; };PARAMETERS
**hosts
An array of host or cluster names.
*numHosts
The number of host names.
To get information on all hosts, set *numHosts to 0; *numHosts will be set to the actual number of hostInfoEnt structures when this call returns.
If *numHosts is 1 and hosts is NULL, information on the local host is returned.
host
The name of the host.
hStatus
The status of the host. It is the bitwise inclusive OR of some of the following:
HOST_STAT_BUSY
The host load is greater than a scheduling threshold. In this status, no new job will be scheduled to run on this host.
HOST_STAT_WIND
The host dispatch window is closed. In this status, no new job will be accepted.
HOST_STAT_DISABLED
The host has been disabled by the LSF administrator and will not accept jobs. In this status, no new job will be scheduled to run on this host.
HOST_STAT_LOCKED
The host is locked by a exclusive task. In this status, no new job will be scheduled to run on this host.
HOST_STAT_FULL
The host has reached its job limit. In this status, no new job will be scheduled to run on this host.
HOST_STAT_UNREACH
The sbatchd on this host is unreachable.
HOST_STAT_UNAVAIL
The LIM and sbatchd on this host are unavailable.
HOST_STAT_UNLICENSED
The host does not have an LSF license.
HOST_STAT_NO_LIM
The host is running an sbatchd but not a LIM.
HOST_STAT_EXCLUSIVE
The host is running an sbatchd but not a LIM.
HOST_STAT_LOCKED_MASTER
LIM locked by master LIM.
HOST_STAT_REMOTE_DISABLED
Close a remote lease host. This flag is used together with HOST_STAT_DISABLED.
HOST_STAT_LEASE_INACTIVE
Close a remote lease host due to the lease is renewing or terminating.
HOST_STAT_DISABLED_RES
Host is disabled by RES.
HOST_STAT_LOCKED_EGO
The host is disabled by RMS.
HOST_CLOSED_BY_ADMIN
If none of the above hold, hStatus is set to HOST_STAT_OK to indicate that the host is ready to accept and run jobs.
busySched & busyStop
If hStatus is HOST_STAT_BUSY, these indicate the host loadSched or loadStop busy reason. If none of the thresholds have been exceeded, the value is HOST_BUSY_NOT. Otherwise the value is the bitwise inclusive OR of some of the following:
HOST_BUSY_R15S
The 15 second average CPU run queue length is too high.
HOST_BUSY_R1M
The 1 minute average CPU run queue length is too high.
HOST_BUSY_R15M
The 15 minute average CPU run queue length is too high.
HOST_BUSY_UT
The CPU utilization is too high.
HOST_BUSY_PG
The paging rate is too high.
HOST_BUSY_IO
The I/O rate is too high.
HOST_BUSY_LS
There are too many login sessions.
HOST_BUSY_IT
The host has not been idle long enough.
HOST_BUSY_TMP
There is not enough free space in the file system containing /tmp.
HOST_BUSY_SWP
There is not enough free swap space.
HOST_BUSY_MEM
There is not enough free memory.
The external load indices are designated by the constants from B 1 << HOST_BUSY_MEM + 1 to 1 << nIdx - 1. The names of these indices can be obtained from ls_info().
cpuFactor
The host CPU factor used to scale CPU load values to account for differences in CPU speeds. The faster the CPU, the larger the CPU factor.
nIdx
The number of load indices in the load, loadSched and loadStop arrays.
load
Load information array on a host. This array gives the load information that is used for scheduling batch jobs. This load information is the effective load information from ls_loadofhosts() (see ls_loadofhosts()) plus the load reserved for running jobs (see lsb.queues for details on resource reservation). The load array is indexed the same as loadSched and loadStop (see loadSched and loadStop below).
loadSched & loadStop
The loadSched and loadStop arrays control batch job scheduling, suspension, and resumption.
The values in the loadSched array specify the scheduling thresholds for the corresponding load indices. Only if the current values of all specified load indices of this host are within (below or above, depending on the meaning of the load index) the corresponding thresholds of this host, will jobs be scheduled to run on this host.
Similarly, the values in the loadStop array specify the stop thresholds for the corresponding load indices. If any of the load index values of the host goes beyond its stop threshold, the job will be suspended.
The loadSched and loadStop arrays are indexed by the following constants:
R15S
15-second average CPU run queue length.
R1M
1-minute average CPU run queue length.
R15M
15-minute average CPU run queue length.
UT
CPU utilization over the last minute.
PG
Average memory paging rate, in pages per second.
IO
Average disk I/O rate, in KB per second.
LS
Number of current login users.
IT
Idle time of the host in minutes.
TMP
The amount of free disk space in the file system containing /tmp, in MB.
SWP
The amount of swap space available, in MB.
MEM
The amount of available user memory on this host, in MB.
windows
One or more time windows in a week during which batch jobs may be dispatched to run on this host . The default is no restriction, or always open (i.e., 24 hours a day, seven days a week). These windows are similar to the dispatch windows of batch job queues. See lsb_queueinfo().
userJobLimit
The maximum number of job slots any user is allowed to use on this host.
maxJobs
The maximum number of job slots that the host can process concurrently.
numJobs
The number of job slots running or suspended on the host.
numRUN
The number of job slots running on the host.
numSSUSP
The number of job slots suspended by the batch daemon on the host.
numUSUSP
The number of job slots suspended by the job submitter or the LSF system administrator.
mig
The migration threshold in minutes after which a suspended job will be considered for migration.
attr
The host attributes; the bitwise inclusive OR of some of the following:
H_ATTR_CHKPNTABLE
This host can checkpoint jobs.
H_ATTR_CHKPNT_COPY
This host provides kernel support for checkpoint copy.
realLoad
The effective load of the host.
numRESERVE
The number of job slots reserved by LSF for the PEND jobs.
chkSig
If attr has an H_ATTR_CHKPNT_COPY attribute, chkSig is set to the signal which triggers checkpoint and copy operation on the host. Otherwise, chkSig is set to the signal which triggers checkpoint operation on the host.
cnsmrUsage
The number of resources used by the consumer.
prvdrUsage
The number of resources used by the provider.
cnsmrAvail
The number of resources available for the consumer to use.
prvdrAvail
The number of resources available for the provider to use.
maxAvail
The maximum number resources available in total.
maxExitRate
The job exit rate threshold on the host.
*hCtrlMsg
AdminAction: host control message.
RETURN VALUES
array:hostInfoEnt
On success, return an array of hostInfoEnt structures which hold the host information and sets *numHosts to the number of hostInfoEnt structures.
char:NULL
Function failed.
ERRORS
If the function fails, lsberrno is set to indicate the error. If lsberrno is LSBE_BAD_HOST, (*hosts)[*numHosts] is not a host known to the batch system. Otherwise, if *numHosts is less than its original value, *numHosts is the actual number of hosts found.
SEE ALSO
Related APIs
lsb_hostinfo_ex()
ls_info() - Returns a pointer to an lsInfo structure
ls_loadofhosts()
lsb_queueinfo() - Get information about job queues
lsb_userinfo() - Get information about users and user groups
Equivalent line command
bhosts
Files
$LSB_CONFDIR/cluster_name/lsb.hosts
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |