The nodes utility builds upon the python-hostlist module and allows you to define node groups in /etc/nodes.conf. The node groups can then be used to answer question about nodes and groups. An example:

  # What nodes belong to the enclosures e2 and e3?
  % nodes e[2-3]

  # Which enclosures contain the nodes n[8-10]?
  % nodes --up enclosure n[8-10]

  # Which nodes are in the same enclosures as n[8-10]?
  % nodes --fill enclosure n[8-10]

  # This is to much to type! Can I abbreviate?
  % nodes -f en n[8-10]

  # Can I express n[1-10] as full enclosures and remaining nodes?
  % nodes --gather enclosure n[1-10]

  # Can I see the example config file used here?
  % cat /etc/nodes.conf
  nodes: n[1-64]
  enclosure e1: n[1-4]
  enclosure e2: n[5-8]
  enclosure e3: n[9-12]
  enclosure e4: n[13-16]
  enclosure e5: n[17-20]
  enclosure e6: n[21-24]
  enclosure e7: n[25-28]
  enclosure e8: n[29-32]
  enclosure e9: n[33-36]
  enclosure e10: n[37-40]
  enclosure e11: n[41-44]
  enclosure e12: n[45-48]
  enclosure e13: n[49-52]
  enclosure e14: n[53-56]
  enclosure e15: n[57-60]
  enclosure e16: n[61-64]
  rack rack1: e[1-8]
  rack rack2: e[9-16]
If you have questions, suggestions, bug reports or patches, please send them to

Related software

The ClusterShell project provides functionality similar to hostlist, nodes and pdsh.

Current release

Older releases