Knowledge Center Contents Previous Next |
lsb_usergrpinfo()
Returns LSF user group membership.
DESCRIPTION
lsb_usergrpinfo() gets LSF user group membership.
LSF user group is defined in the configuration file lsb.users.
The storage for the array of groupInfoEnt structures will be reused by the next call.
SYNOPSIS
#include <lsf/lsbatch.h> struct groupInfoEnt *lsb_usergrpinfo (char **groups, int *numGroups, int options) struct groupInfoEnt { char *group; char *memberList; char *adminMemberList; int *numUserShares; struct 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. It then set lsberrno to LSBE_BAD_GROUP, that is the specified (*groups)[*numGroups] is not a group known to the LSF system. If the first group is invalid, the function returns NULL.
SEE ALSO
Related APIs
lsb_hostgrpinfo()
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 |