1NODESET(1)                 ClusterShell User Manual                 NODESET(1)
2
3
4

NAME

6       nodeset - compute advanced nodeset operations
7

SYNOPSIS

9          nodeset [COMMAND] [OPTIONS] [nodeset1 [-ixX] nodeset2|...]
10

DESCRIPTION

12       The  nodeset  command  is an utility command provided with the Cluster‐
13       Shell library which implements some features of the NodeSet and  Range‐
14       Set  classes.   It  provides easy manipulation of indexed cluster nodes
15       and node groups.
16

OPTIONS

18          --version
19                 show program's version number and exit
20
21          -h, --help
22                 show this help message and exit
23
24          -s GROUPSOURCE, --groupsource=GROUPSOURCE
25                 optional groups.conf(5) group source to use
26
27          Commands:
28
29                 -c, --count
30                        show number of nodes in nodeset(s)
31
32                 -e, --expand
33                        expand nodeset(s) to separate nodes
34
35                 -f, --fold
36                        fold nodeset(s) (or separate nodes) into one nodeset
37
38                 -l, --list
39                        list node groups, followed by corresponding nodes when
40                        specified  two  times (-ll), and also nodes count when
41                        specified three times (-lll). See also -s GROUPSOURCE.
42
43                 -r, --regroup
44                        fold nodes using node groups (see -s GROUPSOURCE)
45
46                 --groupsources
47                        list all configured group sources (see groups.conf(5))
48
49          Operations:
50
51                 -x SUB_NODES, --exclude=SUB_NODES
52                        exclude specified nodeset
53
54                 -i AND_NODES, --intersection=AND_NODES
55                        calculate nodesets intersection
56
57                 -X XOR_NODES, --xor=XOR_NODES
58                        calculate symmetric difference between nodesets
59
60          Options:
61
62                 -a, --all
63                        call external node groups support to display all nodes
64
65                 --autostep=AUTOSTEP
66                        auto step threshold number when folding  nodesets,  if
67                        not   specified,   auto  step  is  disabled.  Example:
68                        autostep=4, "node2 node4 node6" folds  in  node[2,4,6]
69                        but   autostep=3,   "node2   node4   node6"  folds  in
70                        node[2-6/2]
71
72                 -d, --debug
73                        output more messages for debugging purpose
74
75                 -q, --quiet
76                        be quiet, print essential output only
77
78                 -R, --rangeset
79                        switch to RangeSet instead  of  NodeSet.  Useful  when
80                        working on numerical cluster ranges, eg. 1,5,18-31
81
82                 -G, --groupbase
83                        hide group source prefix (always @groupname)
84
85                 -S SEPARATOR, --separator=SEPARATOR
86                        separator   string  to  use  when  expanding  nodesets
87                        (default: ' ')
88
89                 -I SLICE_RANGESET, --slice=SLICE_RANGESET
90                        return sliced off result; examples  of  SLICE_RANGESET
91                        are  "0" for simple index selection, or "1-9/2,16" for
92                        complex rangeset selection
93
94                 --split=MAXSPLIT
95                        split result into a number of subsets
96
97       For a short explanation of these options, see -h, --help.
98
99       If a single hyphen-minus (-) is given as a nodeset,  it  will  be  read
100       from standard input.
101

EXTENDED PATTERNS

103       The nodeset command benefits from ClusterShell 1.3 NodeSet basic arith‐
104       metic addition. This feature extends recognized string patterns by sup‐
105       porting  operators matching all Operations seen previously. String pat‐
106       terns are read from left to right, by proceeding any  character  opera‐
107       tors accordinately.
108
109       Supported character operators
110
111              ,
112
113                     indicates  that  the union of both left and right nodeset
114                     should be computed before continuing
115
116              !
117
118                     indicates the difference operation
119
120              &
121
122                     indicates the intersection operation
123
124              ^
125
126                     indicates the symmetric difference (XOR) operation
127
128              Care should be taken to escape these characters as  needed  when
129              the shell does not interpret them literally.
130
131       Examples of use of extended patterns
132
133              $ nodeset -f node[0-7],node[8-10]
134              node[0-10]
135
136
137              $ nodeset -f node[0-10]!node[8-10]
138              node[0-7]
139
140
141              $ nodeset -f node[0-10]&node[5-13]
142              node[5-10]
143
144
145              $ nodeset -f node[0-10]^node[5-13]
146              node[0-4,11-13]
147
148
149       Example of advanced usage
150
151              $ nodeset -f @gpu^@slurm:bigmem!@chassis[1-9/2]
152
153              This  computes  a folded nodeset containing nodes found in group
154              @gpu and @slurm:bigmem, but not in both, minus the  nodes  found
155              in odd chassis groups from 1 to 9.
156

EXIT STATUS

158       An  exit  status  of  zero  indicates success of the nodeset command. A
159       non-zero exit status indicates failure.
160

EXAMPLES

162       Getting the node count
163
164              $ nodeset -c node[0-7,32-159]
165              136
166
167
168              $ nodeset -c node[0-7,32-159] node[160-163]
169              140
170
171
172              $ nodeset -c @login
173              4
174
175
176       Folding nodesets
177
178              $ nodeset -f node[0-7,32-159] node[160-163]
179              node[0-7,32-163]
180
181
182       Expanding nodesets
183
184              $ nodeset -e node[160-163]
185              node160 node161 node162 node163
186
187
188       Excluding nodes from nodeset
189
190              $ nodeset -f node[32-159] -x node33
191              node[32,34-159]
192
193
194       Computing nodesets intersection
195
196              $ nodeset -f node[32-159] -i node[0-7,20-21,32,156-159]
197              node[32,156-159]
198
199
200       Computing nodesets symmetric difference (xor)
201
202              $ nodeset -f node[33-159] --xor node[32-33,156-159]
203              node[32,34-155]
204
205

HISTORY

207       Command syntax has been changed since nodeset  command  available  with
208       ClusterShell v1.1. Operations, like --intersection or -x, are now spec‐
209       ified between nodesets in the command line.
210
211       ClusterShell v1.1:
212
213              $ nodeset -f -x node[3,5-6,9] node[1-9]
214              node[1-2,4,7-8]
215
216
217       ClusterShell v1.2+:
218
219              $ nodeset -f node[1-9] -x node[3,5-6,9]
220              node[1-2,4,7-8]
221
222

SEE ALSO

224       clush(1), clubak(1), groups.conf(5).
225

BUG REPORTS

227       Use the following URL to submit a bug report or feedback:
228              http://sourceforge.net/apps/trac/clustershell/report
229

AUTHOR

231       Stephane Thiell, CEA DAM  <stephane.thiell@cea.fr>
232
234       CeCILL-C V1
235
236
237
238
2391.5.1                             2011-06-09                        NODESET(1)
Impressum