Skip to content
thiell edited this page Mar 4, 2012 · 2 revisions

clubak

clubak is an utility provided with ClusterShell to gather and sort dsh-like outputs. Please note that it's not necessary to use clubak with clush as all of its features are already included in clush (eg. -b, -B, -L, etc.). Take a look at the man page examples to see when it can be useful.

Man page (1.3)

Source of the latest clubak reStructuredText man page is available at:

https://github.com/cea-hpc/clustershell/blob/master/doc/txt/clubak.txt

=========
 clubak
=========

-----------------------------------------
format output from clush/pdsh-like output
-----------------------------------------

:Date:   2010-05-25

SYNOPSIS
========

``clubak`` [ OPTIONS ]

DESCRIPTION
===========
``clubak`` formats text from standard input containing lines of the form
"`node:output`".  It is fully backward compatible with ``dshbak``\(1) but
provides additonal features. For instance, ``clubak`` always displays
its results sorted by node/nodeset.

You do not need to use ``clubak`` when using ``clush``\(1) as all output
formatting features are already included in.

Like ``clush``\(1), ``clubak`` uses the `ClusterShell.MsgTree` module of the
ClusterShell library (see ``pydoc ClusterShell.MsgTree``).

INVOCATION
==========

``clubak`` should be started with connected standard input.

OPTIONS
=======

--version      show ``clubak`` version number and exit
-b, -c         gather nodes with same output (-c is provided for ``dshbak``\(1)
               compatibility)
-d, --debug    output more messages for debugging purpose
-L             disable header block and order output by nodes
-r, --regroup  fold nodeset using node groups
-s GROUPSOURCE, --groupsource=GROUPSOURCE
               optional ``groups.conf``\(5) group source to use
-G, --groupbase
               do not display group source prefix (always `@groupname`)
-S SEPARATOR, --separator=SEPARATOR
               node / line content separator string (default: `:`)

EXIT STATUS
===========

An exit status of zero indicates success of the ``clubak`` command.

EXAMPLES
===========

1. ``clubak`` can be used to gather some recorded ``clush``\(1) results:

Record ``clush``\(1) results in a file:
    | # clush -w node[1-7] uname -r >/tmp/clush_output
    | # clush -w node[32-159] uname -r >>/tmp/clush_output
Display file gathered results (in line-mode):
    | # clubak -bL </tmp/clush_output

2. Another example, iterate over `node*` text files in current directory and gather characters count for all of them:

    | # find -name "node*" -exec wc -c {} \; | awk '{ gsub("./","",$2); print $2": "$1 }' | clubak -bL
    | node[1,3]: 7
    | node2: 9

SEE ALSO
========

``clush``\(1), ``nodeset``\(1), ``groups.conf``\(5).

BUG REPORTS
===========

Use the following URL to submit a bug report or feedback:
  http://sourceforge.net/apps/trac/clustershell/report
Clone this wiki locally