Administration Guide
Name
nodegrp - Manages node group definitions in the IBM Cluster Systems
Management for Linux (CSM) database.
Synopsis
nodegrp {-h | -f file |
-g |-L | -p | -a
nodelist | -x nodelist | -D |
-l | -w selectstr | -W |
-s node}
nodegrp [-v | -V]
[-I] [-Sgroup1
group2] [-d delim]
[group]
Description
The nodegrp command can be run on any node, including the
management server. It lists and updates the node groups that are
defined to IBM Cluster Systems Management for Linux (CSM). Node groups
can be either explicit lists of node host names created with the -a
option or a dynamic group that uses a select string specified with the
-w option. When -w selectstr is
specified, the nodegrp command uses that string to apply against the
node database each time the nodegrp command is invoked to display the
members of the group.
Options can also be used to list all node groups, delete a node group, or
remove nodes from a node group. The group specified as the input to the
command is the group that is to be acted on for all options specified.
The host parameter can be specified by either a host name or an
IP address.
The group parameter is the name of the node group to be
acted on. You can only specify multiple groups with the
-p option or no option.
- Note:
- The -P and -B options are no longer
valid for this command.
Options
- -a nodelist
- Adds host names to a group, creating a group if necessary. A node
list consists of one or more comma-separated host names.
- -d delim
- Specifies the delimiter used to separate the items returned.
- -D
- Deletes a group.
- -f file
- Specifies a file that contains a list of groups to be defined. If
the file name is "-", then the list is read from stdin. Each line of
the file should contain the group name followed by a colon, then the following
three fields separated by commas: type (static or
dynamic), the validation setting (validated or not
validated), and the definition of the group contents (either a select
string or the unexpanded member list). This is same format that is
output by the -L option.
- -g
- The names in the group just represent generic names, they do not have to
be actual node names in the CSM cluster. This option can only be used
with -a when creating a group.
- -h
- Writes the command's usage statement to standard output.
- -I
- Take the intersection of the two groups specified and display the
results. Neither group is modified. Type as an uppercase
i.
- -l
- Lists all defined node groups.
- -L
- List the definition of all groups. Each line of output will
represent one group and will display its name, the type (static or
dynamic), the validation setting (-g), and the
definition of the group contents (either a select string or the unexpanded
member list).
- -p
- Prints a group. If no option is specified, this is the
default.
- -s host
- Displays all the group names (static and dynamic) that contain the node
represented by this host name or IP address.
- -S
- Subtract the membership of the second group from the first group and
display the members that are left. Neither group is
modified.
- -v | V
- Writes the command's verbose messages to standard output.
- -w selectstr
- Specifies the "where" clause of a select string to be used to search
the nodes table in the database to dynamically determine the list of nodes in
the group. The group is created if it does not already
exist.
- -W
- Displays the "where" clause of the select string set for this node
group.
- -x nodelist
- Removes nodes from a group.
Exit Status
- 1
- A combination of options and arguments has been entered that is not
valid.
- 12
- Group not found.
- 13
- Did not specify two groups required for the operation.
- 14
- "where" string set in attempt to add nodes to group.
- 15
- "where" string set in attempt to remove nodes from group.
- 16
- Member list set in attempt to set the "where" string.
- 17
- "where" string not set in attempt to display the "where"
string.
- 18
- Error opening file to read group definitions.
- 19
- Improper format in group file.
Examples
- To list all of the node groups, type:
nodegrp
- To create a node group called g1 that contains
websvr1 and websvr2, type:
nodegrp -a websvr1,websvr2 g1
- To list the members of g1, type:
nodegrp g1
- To add a node (websvr3) to g1, type:
nodegrp -a websvr3 g1
- To remove websvr2 from g1, type:
nodegrp -x websvr2 g1
- To create a node group called ws that contains all the nodes
that start with websvr, type:
nodegrp -w "Hostname like 'websvr%'" ws
Files
- /opt/csm/bin/nodegrp
- Location of the nodegrp command.
See Also
The chnode, lsnode, and rmnode man
pages.
Author
Bruce Potter - cluster@us.ibm.com
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]