-
Notifications
You must be signed in to change notification settings - Fork 86
nodeset
thiell edited this page Mar 4, 2012
·
3 revisions
The nodeset
command is an useful command provided with ClusterShell that implements most of the NodeSet class features. The nodeset
command aims to be user-friendly and can also easily enhance your shell scripts.
Usage: nodeset [COMMAND] [OPTIONS] [ns1 [-ixX] ns2|...]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-s GROUPSOURCE, --groupsource=GROUPSOURCE
optional groups.conf(5) group source to use
Commands:
-c, --count show number of nodes in nodeset(s)
-e, --expand expand nodeset(s) to separate nodes
-f, --fold fold nodeset(s) (or separate nodes) into one nodeset
-l, --list list node groups (see -s GROUPSOURCE)
-r, --regroup fold nodes using node groups (see -s GROUPSOURCE)
--groupsources list all configured group sources (see groups.conf(5))
Operations:
-x SUB_NODES, --exclude=SUB_NODES
exclude specified nodeset
-i AND_NODES, --intersection=AND_NODES
calculate nodesets intersection
-X XOR_NODES, --xor=XOR_NODES
calculate symmetric difference between nodesets
Options:
-a, --all call external node groups support to display all nodes
--autostep=AUTOSTEP
auto step threshold number when folding nodesets
-d, --debug output more messages for debugging purpose
-q, --quiet be quiet, print essential output only
-R, --rangeset switch to RangeSet instead of NodeSet. Useful when
working on numerical cluster ranges, eg. 1,5,18-31
-G, --groupbase hide group source prefix (always "@groupname")
-S SEPARATOR, --separator=SEPARATOR
separator string to use when expanding nodesets
(default: ' ')
-I SLICE_RANGESET, --slice=SLICE_RANGESET
return sliced off result
--split=MAXSPLIT split result into a number of subsets
$ nodeset -c nova[0-7,32-159]
136
$ nodeset -c nova[0-7,32-159] nova[160-163]
140
$ nodeset -f nova[0-7,32-159] nova[160-163]
nova[0-7,32-163]
$ nodeset -e nova[160-163]
nova160 nova161 nova162 nova163
$ nodeset -f nova[32-159] -x nova33
nova[32,34-159]
$ nodeset -f nova[32-159] -i nova[0-7,20-21,32,156-159]
nova[32,156-159]
$ nodeset -f nova[33-159] --xor nova[32-33,156-159]
nova[32,34-155]
$ nodeset --split=2 -f nova[32-159]
nova[32-95]
nova[96-159]
$ nodeset -c nova[32-95]
64
$ nodeset -c nova[96-159]
64
$ nodeset --split=3 -f nova[32-159]
nova[32-74]
nova[75-117]
nova[118-159]
$ nodeset -c nova[32-74]
43
$ nodeset -c nova[75-117]
43
$ nodeset -c nova[118-159]
42
$ nodeset -f -I 0 nova[10-14]
nova10
$ nodeset -f -I 1,3-4 nova[10-14]
nova[11,13-14]
$ nodeset -f -I 0-4/2 nova[10-14]
nova[10,12,14]
$ nodeset -f -I 0-4/2 --autostep=2 nova[10-14]
nova[10-14/2]