.\" Man page generated from reStructeredText. . .TH NODESET 1 "2012-03-31" "1.6" "ClusterShell User Manual" .SH NAME nodeset \- compute advanced nodeset operations . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp \fCnodeset\fP [COMMAND] [OPTIONS] [nodeset1 [\-ixX] nodeset2|...] .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fCnodeset\fP is an utility command provided with the ClusterShell library which implements some features of ClusterShell\(aqs NodeSet and RangeSet Python classes. It provides easy manipulation of indexed cluster nodes and node groups. It is automatically bound to the library node group resolution mechanism. Thus, \fCnodeset\fP is especially useful to enhance cluster aware administration shell scripts. .SH OPTIONS .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \-\-version . show program\(aqs version number and exit .TP .B \-h, \-\-help . show this help message and exit .TP .BI \-s \ GROUPSOURCE, \ \-\-groupsource\fB= GROUPSOURCE . optional \fCgroups.conf\fP(5) group source to use .UNINDENT .INDENT 0.0 .TP .B Commands: .INDENT 7.0 .TP .B \-c, \-\-count . show number of nodes in nodeset(s) .TP .B \-e, \-\-expand . expand nodeset(s) to separate nodes (see also \-S \fISEPARATOR\fP) .TP .B \-f, \-\-fold . fold nodeset(s) (or separate nodes) into one nodeset .TP .B \-l, \-\-list . list node groups, list node groups and nodes (\fC\-ll\fP) or list node groups, nodes and node count (\fC\-lll\fP). When no argument is specified at all, this command will list all node group names found in selected group source (see also \-s \fIGROUPSOURCE\fP). If any nodesets are specified as argument, this command will find node groups these nodes belongs to (individually). Optionally for each group, the fraction of these nodes being member of the group may be displayed (with \fC\-ll\fP), and also member count/total group node count (with \fC\-lll\fP). If a single hyphen\-minus (\-) is given as a nodeset, it will be read from standard input. .TP .B \-r, \-\-regroup . fold nodes using node groups (see \-s \fIGROUPSOURCE\fP) .TP .B \-\-groupsources . list all configured group sources (see \fCgroups.conf\fP(5)) .UNINDENT .TP .B Operations: .INDENT 7.0 .TP .BI \-x \ SUB_NODES, \ \-\-exclude\fB= SUB_NODES . exclude specified nodeset .TP .BI \-i \ AND_NODES, \ \-\-intersection\fB= AND_NODES . calculate nodesets intersection .TP .BI \-X \ XOR_NODES, \ \-\-xor\fB= XOR_NODES . calculate symmetric difference between nodesets .UNINDENT .TP .B Options: .INDENT 7.0 .TP .B \-a, \-\-all . call external node groups support to display all nodes .TP .BI \-\-autostep\fB= AUTOSTEP . auto step threshold number when folding nodesets, if not specified, auto step is disabled. Example: autostep=4, "node2 node4 node6" folds in node[2,4,6] but autostep=3, "node2 node4 node6" folds in node[2\-6/2] .TP .B \-d, \-\-debug . output more messages for debugging purpose .TP .B \-q, \-\-quiet . be quiet, print essential output only .TP .B \-R, \-\-rangeset . switch to RangeSet instead of NodeSet. Useful when working on numerical cluster ranges, eg. 1,5,18\-31 .TP .B \-G, \-\-groupbase . hide group source prefix (always \fI@groupname\fP) .TP .BI \-S \ SEPARATOR, \ \-\-separator\fB= SEPARATOR . separator string to use when expanding nodesets (default: \(aq \(aq) .TP .BI \-I \ SLICE_RANGESET, \ \-\-slice\fB= SLICE_RANGESET . return sliced off result; examples of SLICE_RANGESET are "0" for simple index selection, or "1\-9/2,16" for complex rangeset selection .TP .BI \-\-split\fB= MAXSPLIT . split result into a number of subsets .TP .B \-\-contiguous . split result into contiguous subsets (ie. for nodeset, subsets will contain nodes with same pattern name and a contiguous range of indexes, like foobar[1\-100]; for rangeset, subsets with consists in contiguous index ranges)""" .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp For a short explanation of these options, see \fC\-h, \-\-help\fP. .sp If a single hyphen\-minus (\-) is given as a nodeset, it will be read from standard input. .SH EXTENDED PATTERNS .sp The \fCnodeset\fP command benefits from ClusterShell NodeSet basic arithmetic addition. This feature extends recognized string patterns by supporting operators matching all Operations seen previously. String patterns are read from left to right, by proceeding any character operators accordinately. .INDENT 0.0 .TP .B Supported character operators .INDENT 7.0 .TP .B \fC,\fP .sp indicates that the \fIunion\fP of both left and right nodeset should be computed before continuing .TP .B \fC!\fP .sp indicates the \fIdifference\fP operation .TP .B \fC&\fP .sp indicates the \fIintersection\fP operation .TP .B \fC^\fP .sp indicates the \fIsymmetric difference\fP (XOR) operation .UNINDENT .sp Care should be taken to escape these characters as needed when the shell does not interpret them literally. .TP .B Examples of use of extended patterns .INDENT 7.0 .TP .B $ nodeset \-f node[0\-7],node[8\-10] .UNINDENT .nf node[0\-10] .fi .sp .INDENT 7.0 .TP .B $ nodeset \-f node[0\-10]!node[8\-10] .UNINDENT .nf node[0\-7] .fi .sp .INDENT 7.0 .TP .B $ nodeset \-f node[0\-10]&node[5\-13] .UNINDENT .nf node[5\-10] .fi .sp .INDENT 7.0 .TP .B $ nodeset \-f node[0\-10]^node[5\-13] .UNINDENT .nf node[0\-4,11\-13] .fi .sp .TP .B Example of advanced usage .INDENT 7.0 .TP .B $ nodeset \-f @gpu^@slurm:bigmem!@chassis[1\-9/2] .UNINDENT .sp This computes a folded nodeset containing nodes found in group @gpu and @slurm:bigmem, but not in both, minus the nodes found in odd chassis groups from 1 to 9. .UNINDENT .SH EXIT STATUS .sp An exit status of zero indicates success of the \fCnodeset\fP command. A non\-zero exit status indicates failure. .SH EXAMPLES .INDENT 0.0 .TP .B Getting the node count .INDENT 7.0 .TP .B $ nodeset \-c node[0\-7,32\-159] .UNINDENT .nf 136 .fi .sp .INDENT 7.0 .TP .B $ nodeset \-c node[0\-7,32\-159] node[160\-163] .UNINDENT .nf 140 .fi .sp .INDENT 7.0 .TP .B $ nodeset \-c @login .UNINDENT .nf 4 .fi .sp .TP .B Folding nodesets .INDENT 7.0 .TP .B $ nodeset \-f node[0\-7,32\-159] node[160\-163] .UNINDENT .nf node[0\-7,32\-163] .fi .sp .INDENT 7.0 .TP .B $ echo node3 node6 node1 node2 node7 node5 | nodeset \-f .UNINDENT .nf node[1\-3,5\-7] .fi .sp .TP .B Expanding nodesets .INDENT 7.0 .TP .B $ nodeset \-e node[160\-163] .UNINDENT .nf node160 node161 node162 node163 .fi .sp .TP .B Excluding nodes from nodeset .INDENT 7.0 .TP .B $ nodeset \-f node[32\-159] \-x node33 .UNINDENT .nf node[32,34\-159] .fi .sp .TP .B Computing nodesets intersection .INDENT 7.0 .TP .B $ nodeset \-f node[32\-159] \-i node[0\-7,20\-21,32,156\-159] .UNINDENT .nf node[32,156\-159] .fi .sp .TP .B Computing nodesets symmetric difference (xor) .INDENT 7.0 .TP .B $ nodeset \-f node[33\-159] \-\-xor node[32\-33,156\-159] .UNINDENT .nf node[32,34\-155] .fi .sp .TP .B Splitting nodes into several nodesets (expanding results) .INDENT 7.0 .TP .B $ nodeset \-e \-\-split=3 node[1\-9] .UNINDENT .nf node1 node2 node3 node4 node5 node6 node7 node8 node9 .fi .sp .TP .B Splitting non\-contiguous nodesets (folding results) .INDENT 7.0 .TP .B $ nodeset \-f \-\-contiguous node2 node3 node4 node8 node9 .UNINDENT .nf node[2\-4] node[8\-9] .fi .sp .UNINDENT .SH HISTORY .sp Command syntax has been changed since \fCnodeset\fP command available with ClusterShell v1.1. Operations, like \fI\-\-intersection\fP or \fI\-x\fP, are now specified between nodesets in the command line. .INDENT 0.0 .TP .B ClusterShell v1.1: .INDENT 7.0 .TP .B $ nodeset \-f \-x node[3,5\-6,9] node[1\-9] .UNINDENT .nf node[1\-2,4,7\-8] .fi .sp .TP .B ClusterShell v1.2+: .INDENT 7.0 .TP .B $ nodeset \-f node[1\-9] \-x node[3,5\-6,9] .UNINDENT .nf node[1\-2,4,7\-8] .fi .sp .UNINDENT .SH SEE ALSO .sp \fCclush\fP(1), \fCclubak\fP(1), \fCgroups.conf\fP(5). .SH BUG REPORTS .INDENT 0.0 .TP .B Use the following URL to submit a bug report or feedback: . \fI\%https://github.com/cea\-hpc/clustershell/issues\fP .UNINDENT .SH AUTHOR Stephane Thiell, CEA DAM .SH COPYRIGHT CeCILL-C V1 .\" Generated by docutils manpage writer. .\" .