Knowledge Center         Contents    Previous  Next    
Platform Computing Corp.

lsb_hostgrpinfo()

Returns LSF host group membership.

DESCRIPTION

lsb_hostgrpinfo() gets LSF host group membership.

LSF host group is defined in the configuration file lsb.hosts.

The storage for the array of groupInfoEnt structures will be reused by the next call.

SYNOPSIS

#include <lsf/lsbatch.h> 
struct groupInfoEnt *lsb_hostgrpinfo (char **groups, 
                     int *numGroups, int options) 
 
struct groupInfoEnt { 
    char *group; 
    char *memberList; 
    char *adminMemberList; 
    int  numUserShares; 
    struct userShares  *userShares; 
    int  options; 
    char *pattern; 
    char *neg_pattern; 
    int  cu_type; 
}; 

PARAMETERS

**groups

An array of group names.

*numGroups

The number of group names. *numGroups will be updated to the actual number of groups when this call returns.

options

The bitwise inclusive OR of some of the following flags:

GRP_RECURSIVE

Expand the group membership recursively. That is, if a member of a group is itself a group, give the names of its members recursively, rather than its name, which is the default.

GRP_ALL

Get membership of all groups.

groupInfoEnt structure fields

group

Group name.

memberList

ASCII list of member names.

adminMemberList

ASCII list of admin member names.

numUserShares

The number of users with shares.

userShares

The user shares representation.

options

The bitwise inclusive OR of some of the following:

GRP_NO_CONDENSE_OUTPUT

0x01 Group output is in regular (uncondensed) format.

GRP_CONDENSE_OUTPUT

0x02 Group output is in condensed format.

GRP_HAVE_REG_EXP

0x04

GRP_SERVICE_CLASS

0x08 Group is a service class.

GRP_IS_CU

0x10 Group is a compute unit.

pattern

Host membership pattern.

neg_pattern

Negation membership pattern.

cu_type

Compute unit type.

RETURN VALUES

array:groupInfoEnt

On success, returns an array of groupInfoEnt structures which hold the group name and the list of names of its members. If a member of a group is itself a group (i.e., a subgroup), then a '/' is appended to the name to indicate this. *numGroups is the number of groupInfoEnt structures returned.

char:NULL

Function failed.

ERRORS

On failure, returns NULL and sets lsberrno to indicate the error. If there are invalid groups specified, the function returns the groups up to the invalid ones and then sets lsberrno to LSBE_BAD_GROUP, which means that the specified (*groups)[*numGroups] is not a group known to the LSF system. If the first group specified is invalid, the function returns NULL.

SEE ALSO

Related APIs

lsb_usergrpinfo()

Equivalent line command

none

Files

$LSB_CONFDIR/cluster_name/lsb.hosts

$LSB_CONFDIR/cluster_name/lsb.users


Platform Computing Inc.
www.platform.com
Knowledge Center         Contents    Previous  Next