Debian Codegraph @

doc/txt/clubak.txt

raw
1 =========
2 clubak
3 =========
4
5 --------------------------------------------------
6 format output from clush/pdsh-like output and more
7 --------------------------------------------------
8
9 :Author: Stephane Thiell
10 :Date: 2026-07-16
11 :Copyright: GNU Lesser General Public License version 2.1 or later (LGPLv2.1+)
12 :Version: 1.10.1
13 :Manual section: 1
14 :Manual group: ClusterShell User Manual
15
16
17 SYNOPSIS
18 ========
19
20 ``clubak`` [ OPTIONS ]
21
22 DESCRIPTION
23 ===========
24 ``clubak`` formats text from standard input containing lines of the form
25 "`node:output`". It is fully backward compatible with ``dshbak``\(1) but
26 provides additional features. For instance, ``clubak`` always displays
27 its results sorted by node/nodeset.
28
29 You do not need to use ``clubak`` when using ``clush``\(1) as all output
30 formatting features are already included in it. It is provided for other usages,
31 like post-processing results of the form "`node:output`".
32
33 Like ``clush``\(1), ``clubak`` uses the `ClusterShell.MsgTree` module of the
34 ClusterShell library (see ``pydoc ClusterShell.MsgTree``).
35
36 INVOCATION
37 ==========
38
39 ``clubak`` should be started with connected standard input.
40
41 OPTIONS
42 =======
43
44 --version show ``clubak`` version number and exit
45 -b, -c, --dshbak
46 gather nodes with same output (-c and --dshbak are provided
47 for ``dshbak``\(1) compatibility)
48 -B same as -b; accepted for compatibility with ``clush``\(1), where -B also gathers standard error
49 -q, --quiet be quiet, print essential output only (e.g. suppress the node count displayed next to gathered nodeset headers)
50 -v, --verbose be verbose, print informative messages; also echo each input line to standard output prefixed by ``INPUT``
51 -d, --debug output more messages for debugging purpose
52 -L disable header block and order output by nodes
53 -N disable labeling of command output
54 -r, --regroup fold nodeset using node groups
55 --axis=RANGESET
56 for nD nodesets, fold the displayed nodeset (e.g. in gathered output headers) along provided axis only. Axes are indexed from 1 to n and can be specified here either using the rangeset syntax, e.g. '1', '1-2', '1,3', or by a single negative number meaning that the index is counted from the end. Because some nodesets may have several different dimensions, axis indices are silently truncated to fall in the allowed range. This is the per-invocation equivalent of the ``fold_axis`` library default.
57 -s GROUPSOURCE, --groupsource=GROUPSOURCE
58 optional ``groups.conf``\(5) group source to use
59 --groupsconf=FILE
60 use alternate config file for ``groups.conf``\(5)
61 -G, --groupbase
62 do not display group source prefix (always `@groupname`)
63 -S SEPARATOR, --separator=SEPARATOR
64 node / line content separator string (default: `:`)
65 -F, --fast faster but memory hungry mode (preload all messages per node)
66 -T, --tree message tree trace mode; switch to enable ``ClusterShell.MsgTree`` trace mode, all keys/nodes being kept for each message element of the tree, thus allowing special output display
67 --interpret-keys=INTERPRET_KEYS
68 whether to interpret keys (the field before the separator on each input line) as node sets. *INTERPRET_KEYS* is ``never``, ``always`` or ``auto`` (the default). With ``never``, each key is kept as a plain string; with ``always``, every key must be a valid node set; with ``auto``, keys are interpreted as node sets, but if any key cannot be parsed, ``clubak`` silently switches to treating all keys as plain strings.
69 --color=WHENCOLOR ``clubak`` can use NO_COLOR, CLICOLOR and CLICOLOR_FORCE environment variables. ``--color`` command line option always takes precedence over environment variables. NO_COLOR takes precedence over CLICOLOR_FORCE which takes precedence over CLICOLOR. ``--color`` tells whether to use ANSI colors to surround node or nodeset prefix/header with escape sequences to display them in color on the terminal. *WHENCOLOR* is ``never``, ``always`` or ``auto`` (which uses color if standard output refers to a terminal). Color is set to [34m (blue foreground text) and cannot be modified.
70 --diff show diff between gathered outputs
71
72
73 EXIT STATUS
74 ===========
75
76 An exit status of zero indicates success of the ``clubak`` command.
77
78 EXAMPLES
79 ===========
80
81 1. ``clubak`` can be used to gather some recorded ``clush``\(1) results:
82
83 Record ``clush``\(1) results in a file:
84 | # clush -w node[1-7] uname -r >/tmp/clush_output
85 | # clush -w node[32-159] uname -r >>/tmp/clush_output
86 Display file gathered results (in line-mode):
87 | # clubak -bL </tmp/clush_output
88
89 2. Another example, iterate over `node*` text files in current directory and gather characters count for all of them:
90
91 | # find -name "node*" -exec wc -c {} \; | awk '{ gsub("./","",$2); print $2": "$1 }' | clubak -bL
92 | node[1,3]: 7
93 | node2: 9
94
95 SEE ALSO
96 ========
97
98 ``cluset``\(1), ``clush``\(1), ``nodeset``\(1), ``groups.conf``\(5).
99
100 https://clustershell.readthedocs.io/
101
102 BUG REPORTS
103 ===========
104
105 Use the following URL to submit a bug report or feedback:
106 https://github.com/clustershell/clustershell/issues
107