Knowledge Center Contents Previous Next |
lsb_hostpartinfo()
Returns informaton about host partitions.
DESCRIPTION
lsb_hostpartinfo() gets information about host partitions.
The hostPartInfoEnt structure has the following fields:
hostPart
The name of the host partition.
hostList
A blank-separated list of names of hosts and host groups which are members of the host partition. The name of a host group has a '/' appended. (See lsb_hostgrpinfo().)
numUsers
The number of users in this host partition. i.e., the number of hostPartUserInfo structures.
users
An array of hostPartUserInfo structures which hold information on users in this host partition.
The hostPartUserInfo structure has the following fields:
user
The user name or user group name. (See lsb_userinfo() and lsb_usergrpinfo().)
shares
The number of shares assigned to the user or user group, as configured in the file lsb.hosts. (See lsb.hosts.)
numStartJobs
The number of job slots belonging to the user or user group that are running or suspended in the host partition.
numReserveJobs
The number of job slots that are reserved for the PEND jobs belonging to the user or user group in the host partition.
histCpuTime
The normalized CPU time accumulated in the host partition during the recent period by finished jobs belonging to the user or user group. The period may be configured in the file lsb.params (see lsb.params), with a default value of five (5) hours.
priority
The priority of the user or user group to use the host partition. Bigger values represent higher priorities. Jobs belonging to the user or user group with the highest priority are considered first for dispatch when resources in the host partition are being contended for. In general, a user or user group with more shares, fewer numStartJobs and less histCpuTime has higher priority.
The storage for the array of hostPartInfoEnt structures will be reused by the next call.
runTime
The time unfinished jobs spend in the RUN state.
shareAdjustment
The fairshare adjustment value from the fairshare plugin (libfairshareadjust.*). The adjustment is enabled and weighted by setting the value of FAIRSHARE_ADJUSTMENT_FACTOR in lsb.params.
SYNOPSIS
#include <lsf/lsbatch.h> struct hostPartInfoEnt *lsb_hostpartinfo (char **hostParts, int *numHostParts) struct hostPartInfoEnt { char hostPart[MAX_LSB_NAME_LEN]; char *hostList; int numUsers; struct hostPartUserInfo *users; }; struct hostPartUserInfo { char user[MAX_LSB_NAME_LEN]; int shares; float priority; int numStartJobs; float histCpuTime; int numReserveJobs; int runTime; float shareAdjustment; };PARAMETERS
**hostParts
An array of host partition names.
*numHostHosts
The number of host partition names.
To get information on all host partitions, set hostParts to NULL; *numHostParts will be the actual number of host partitions when this call returns.
RETURN VALUES
array:hostPartInfoEnt
On success, returns an array of hostPartInfoEnt structures which hold information on the host partitions, and sets *numHostParts to the number of hostPartInfoEnt structures.
char:NULL
Function failed.
ERRORS
If the function fails, lsberrno is set to indicate the error. If lsberrno is LSBE_BAD_HPART, (*hostParts)[*numHostParts] is not a host partition known to the LSF system. Otherwise, if *numHostParts is less than its original value, *numHostParts is the actual number of host partitions found.
SEE ALSO
Related APIs
lsb_usergrpinfo()
lsb_hostgrpinfo()
Equivalent line command
none
Files
$LSB_CONFDIR/cluster_name/lsb.hosts
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |