Skip to content


Subversion checkout URL

You can clone with
Download ZIP


thiell edited this page · 15 revisions

Welcome to the ClusterShell Wiki

ClusterShell is an event-based Python library to execute commands on local or distant cluster nodes in parallel depending on the selected engine and worker mechanisms. The library provides advanced node sets and node groups handling methods. Its goal is to improve the administration of cluster by providing a lightweight but scalable API for developers. Also, clush, clubak and nodeset, three convenient command-line tools using the library are included.

Why you need ClusterShell

Write cluster-aware scripts in Python

ClusterShell allows for running commands in parallel on very large Linux clusters using present remote shell facilities on your cluster like SSH. Beyond traditional shell scripts, it is designed to easily write administrative scripts or applications for clusters in Python. A very simple example of ClusterShell script speaks louder than words (also see NodeSet, Task):

from ClusterShell.Task import task_self, NodeSet

task = task_self()"/bin/uname -r", nodes="callisto[36-39,133]")

for output, nodes in task.iter_buffers():
    print NodeSet.fromlist(nodes), output

Use the best parallel shell tool

ClusterShell comes with a full-featured command line (clush) for sending cluster commands and gathering output data. Some very simple examples follow:

$ clush -b -w callisto[32-157] uname -r
$ clush -b -r -w callisto[32-157] uname -r

Improve your admin life with node groups

The library defines a node groups syntax (through the NodeSet class) and allows you to bind several group sources to your ClusterShell-ready applications. The nodeset command allows you to easily compute node-set operations from the shell:

$ nodeset -f donut[1-9] -x donut[2,5]

$ nodeset -e pizza[2-22/2]
pizza2 pizza4 pizza6 pizza8 pizza10 pizza12 pizza14 pizza16 pizza18 pizza20 pizza22

$ for node in $(nodeset -e pizza[2-640]); do something_with $node; done

...and NodeGroups too:

$ nodeset -f @oss @mds

$ nodeset -r @oss @mds


  • Stable version: 1.6
  • Development version: 2.0
  • Supported plateforms are RHEL5, RHEL6, Fedora 11-16, Debian, Ubuntu and Arch Linux.
  • If you're stuck with Python 2.3 (RHEL4), you can still use version 1.1.



Presentation and example pages


Something went wrong with that request. Please try again.