Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Scalable cluster administration Python framework — Manage node sets, node groups and execute commands on cluster nodes in parallel.
Python Shell

nD nodeset: added fold axis support and --axis option to nodeset

This adds support for constrainted nD folded nodeset to improve external
tools support.

NodeSetBase's member fold_axis can be set to an iterable over nD
0-indexed axis integers. If so, only rangesets along fold axis are
effectively folded.

However, we always use nD algorithms internally and only re-expand
rangesets of unspecified axis at __str__() time. This may lead to
suboptimal folding, mostly observed with tricky cases, like
overlapping dimensions, etc.

We cannot really talk about this as a 1.6 compat feature, as 1.6
was mostly broken on these aspects. However, for nodesets fed from
unique nD nodes, like in clush when gathering results, setting
fold_axis to [0] should lead to similar results than 1.6 (this patch
doesn't include the feature for clush).

CLI/ and CLI/

Added --axis=RANGESET option to nodeset, to use with --fold. Axis are
1-indexed with nodeset CLI. Also --axis=-INDEX is supported to count

Tests, docs and examples included.

Closes #269.

Change-Id: Ib1f7947f6ecf7b4acbdd1550800a9d89e32743c4
latest commit a5162d17b8
@thiell thiell authored


 ClusterShell 1.6 Python Library and Tools

ClusterShell is an event-driven open source Python library, designed to run
local or distant commands in parallel on server farms or on large Linux
clusters. It will take care of common issues encountered on HPC clusters, such
as operating on groups of nodes, running distributed commands using optimized
execution algorithms, as well as gathering results and merging identical
outputs, or retrieving return codes. ClusterShell takes advantage of existing
remote shell facilities already installed on your systems, like SSH.

ClusterShell's primary goal is to improve the administration of high-
performance clusters by providing a lightweight but scalable Python API for
developers. It also provides clush, clubak and nodeset, three convenient
command-line tools that allow traditional shell scripts to benefit from some
of the library features.

 Requirements (v1.6)

 * GNU/Linux, *BSD, Mac OS X, etc.

 * OpenSSH (ssh/scp)

 * Python 2.x (x >= 4)


ClusterShell is distributed under the CeCILL-C license, a French transposition
of the GNU LGPL, and is fully LGPL-compatible (see Licence_CeCILL-C_V1-en.txt).


When possible, please use the RPM/deb package distribution:

Otherwise in the source directory, use:

    # python install
    # cp -r conf /etc/clustershell

For installation on Mac OS X, please see:

 Test Suite

Regression testing scripts are available in the 'tests' directory:

    $ cd tests
    $ nosetests -sv <>
    $ nosetests -sv --all-modules

You have to allow 'ssh localhost' and 'ssh $HOSTNAME' without any warnings for
"remote" tests to run as expected. $HOSTNAME should not be nor ::1.
Also some tests use the 'bc' command.


Local API documentation is available, just type:

    $ pydoc ClusterShell

Online API documentation (epydoc) is available here:

 ClusterShell interactively

Python 2.7.1 (r271:86832, Apr 12 2011, 16:15:16)
[GCC 4.6.0 20110331 (Red Hat 4.6.0-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ClusterShell.Task import task_self
>>> from ClusterShell.NodeSet import NodeSet
>>> task = task_self()
>>>"/bin/uname -r", nodes="linux[4-6,32-39]")
<ClusterShell.Worker.Ssh.WorkerSsh object at 0x20a5e90>
>>> for buf, key in task.iter_buffers():
...     print NodeSet.fromlist(key), buf

linux[4-6] 2.6.32-71.el6.x86_64

 ClusterShell Tools

Powerful tools are provided: clush, nodeset and clubak.

* clush is a friendly and full-featured parallel shell (see: man clush).
  If in doubt, just check if your other parallel tools can do things like:
  # tar -czf - dir | clush -w node[10-44] tar -C /tmp -xzvf -

* nodeset is used to deal with your cluster nodeset, it can be bound to
  external groups (see: man nodeset and man groups.conf).

* clubak is a tool used to format output from clush/pdsh-like output
  (already included in clush with -b), see man clubak.


Main web site:

Github source respository:

Github Wiki:

Github Issue tracking system: project page:

Python Package Index (PyPI) link:

ClusterShell was born along with Shine, a scalable Lustre FS admin tool:


Stephane Thiell           <>
Aurelien Degremont     <>
Henri Doreau                 <>

CEA/DAM 2010, 2011, 2012, 2013, 2014, 2015 -
Something went wrong with that request. Please try again.