-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpshbak.1
More file actions
125 lines (112 loc) · 3.45 KB
/
Copy pathpshbak.1
File metadata and controls
125 lines (112 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
.TH pshbak 1 "Version #VERSION#"
.SH NAME
pshbak \- format output from pdsh command
.SH SYNOPSIS
.B pshbak
.RI [ OPTION "]... "
.SH DESCRIPTION
.B pshbak
formats output from parallel shells such as
.B pdsh
and
.BR dsh ,
into a more readable output. It can be used as a drop-in replacement for
.BR dshbak .
Output from
.BR pdsh ,
where each line is prefixed by a hostname followed by a colon,
is read via stdin, collected per hostname, and printed in a
per hostname fashion.
With the often used
.B -c
option, hosts having identical output are collected and the output is
printed only once.
.SH OPTIONS
.TP
.B -c, --collect
Collect hosts having identical output and make the identical output appear to
only once. The collected hostlist representing the nodes is shown in the header before the output.
.TP
.B -d, --unified-diff
Print only the most frequent output in full. Then print any diverging output
as a unified diff relative the most frequent output. This mode of operation
implies the
.B --collect
option
.TP
.B -C, --collect-similar
Collect hosts having relatively similar output, and print the identical part of
the output only once. The parts of the output which differs among the hosts
are replaced with enumerated tags ([DIFF1], [DIFF2], ...).
For two outputs to be considered relatively similar, they must contain the
same number of lines, and in total, the lines must not be too different.
The differences can be printed using either the
.BR --format-diff
or the
.BR --spliced-diff
option.
.TP
.B --spliced-diff
When using
.BR --collect-similar ","
lines containing differences are prefixed by its hostname and
printed together with the collected part of the output.
.TP
.B --no-collected
When using
.BR --collect-similar ","
don't print the collected part. This is intended to be useful together with the
.B --format-diff
option.
.TP
\fB\--format-diff\fR \fIFORMAT\fR
When using
.BR --collect-similar ","
after to collected part, format and print the differences for
each host as specified by \fIFORMAT\fR.
\fIFORMAT\fR is expected to be a text string containing zero or more
occurrences of $h, $1, $2, $3..., which in the output will be replaced
by hostname, DIFF1, DIFF2, DIFF3, etc.
.TP
.B -n, --count
Show the number of hosts in the header (before the hostlist).
.TP
.B -g, --with-garbage
Also print any output not conforming to the "host:output" format
in a special
.I NON-FORMATTED OUTPUT
section before the correctly formatted data. The default mode of operation
is to silently ignore non-conforming lines.
.TP
\fB\--color\fR [yes|no]
Control whether ANSI color codes should be used.
The default behavior is to enable ANSI color codes when writing
to a normal tty, and disable it otherwise.
.TP
.B -h, --help
Display a brief help message.
.SH EXAMPLES
.TP
Collect information about the running kernel version in a \
compute cluster having node names n1, n2, ..., n400 using pdsh and pshbak:
.B pdsh
-w n[1-400] uname -r |
.B pshbak
-c
.SH AUTHOR
Written by Mattias Slabanja <slabanja@chalmers.se>.
The program is published at http://www.nsc.liu.se/~kent/python-hostlist/
.SH SEE ALSO
.IR hostlist "(1), " pdsh "(1), " dshbak "(1)"
The hostlist expression syntax is used by several programs developed at
.B LLNL
(https://computing.llnl.gov/linux/), for example
.B SLURM
(https://computing.llnl.gov/linux/slurm/) and
.B Pdsh
(http://code.google.com/p/pdsh/).
See the
.B HOSTLIST EXPRESSIONS
section of the
.BR pdsh (1)
manual page for a short introduction to the hostlist syntax.