Information in host group or user group

lsb_hostgrpinfo() and lsb_usergrpinfo() get membership of LSF host or user groups.

struct groupInfoEnt *lsb_hostgrpinfo (groups, numGroups,                                       options)
struct groupInfoEnt *lsb_usergrpinfo (groups, numGroups,                                      options) 
    char  **groups;            Array of group names 
    int   *numGroups;          Number of group names 
    int   options;
struct groupInfoEnt { 
    char   *group;            Group name 
    char   *memberList;       ASCII list of member names 
    int    numUserShares;     Number of users with shares 
    struct userShares *userShares; User shares representation 
};
struct userShares { 
    char   *user;             User name 
    int    shares;            Number of shares assigned to the user 
}; 
    options                  The bitwise inclusive OR of some of the 
                              following flags:
USER_GRP

Get the information of user group.

HOST_GRP

Get the information of host.

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.

GRP_SHARES

Display the information in the long format.

lsb_hostgrpinfo() gets LSF host group membership, lsb_usergrpinfo() gets LSF user group membership.

lsb.users(5) and lsb.hosts(5) define LSF user and host groups, respectively.

On success, lsb_hostgrpinfo() and lsb_usergrpinfo() return 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.

On failure, lsb_hostgrpinfo() and lsb_usergrpinfo() returns NULL and sets lsberrno to indicate the error. If lsberrno is LSBE_BAD_GROUP, (*groups)[*numGroups] is not a group known to the LSF system. Otherwise, if *numGroups is less than its original value, *numGroups is the actual number of groups found.