pshbak(1)
β¨ pshbak(1) β¨
okay so bestie, welcome to pshbak β it lives in the General Commands Manual section of your man pages and it's about to make your parallel-shell output look so much cuter. π
πΈ NAME πΈ
pshbak β format output from pdsh command
π SYNOPSIS π
pshbak [OPTION]...
π¦ DESCRIPTION π¦
okay so here's the vibe: pshbak takes output from parallel shells like pdsh and dsh and reformats it into something actually readable. not me being a drop-in replacement for dshbak?? iconic behaviour honestly. π
so like, output from pdsh comes in with every single line prefixed by a hostname and then a colon. pshbak reads all that through stdin, collects it per hostname, and prints it back out grouped by host. per hostname fashion, as the girlies say. π
and then with the super popular -c option? hosts that have identical output get collected together and that output only gets printed once. slay. no more reading the same thing 400 times. periodt.
π OPTIONS π
-c,--collectβ collect hosts that have identical output and make that identical output show up only once. the collected hostlist representing the nodes gets shown in the header, right before the output. β¨-d,--unified-diffβ print only the most frequent output in full, then print any diverging output as a unified diff relative to that most frequent output. heads up bestie, this mode of operation implies the--collectoption. π«Ά-C,--collect-similarβ collect hosts that have relatively similar output, and print the identical part of the output only once. the parts that differ among the hosts get replaced with enumerated tags ([DIFF1],[DIFF2], ...). for two outputs to count as relatively similar, they have to contain the same number of lines, and in total the lines must not be too different. you can print those differences using either the--format-diffor the--spliced-diffoption. π--spliced-diffβ when you're using--collect-similar, lines containing differences get prefixed by their hostname and printed together with the collected part of the output. π§--no-collectedβ when you're using--collect-similar, don't print the collected part. this is intended to be useful together with the--format-diffoption. lowkey a little duo. π―--format-diff FORMATβ when you're using--collect-similar, after the collected part, format and print the differences for each host as specified byFORMAT.FORMATis 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. π«-n,--countβ show the number of hosts in the header (before the hostlist). π’-g,--with-garbageβ also print any output that does not conform to the"host:output"format, in a special NON-FORMATTED OUTPUT section before the correctly formatted data. the default mode of operation is to silently ignore non-conforming lines. π--color [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. π-h,--helpβ display a brief help message. π«Ά
π₯ EXAMPLES π₯
collect info about the running kernel version in a compute cluster having node names n1, n2, ..., n400 using pdsh and pshbak:
pdsh -w n[1-400] uname -r | pshbak -c
π AUTHOR π
written by Mattias Slabanja <slabanja@chalmers.se>.
the program is published at http://www.nsc.liu.se/~kent/python-hostlist/
β SEE ALSO β
hostlist(1), pdsh(1), dshbak(1)
the hostlist expression syntax is used by several programs developed at LLNL (https://computing.llnl.gov/linux/), for example SLURM (https://computing.llnl.gov/linux/slurm/) and Pdsh (http://code.google.com/p/pdsh/).
see the HOSTLIST EXPRESSIONS section of the pdsh(1) manual page for a short introduction to the hostlist syntax.
and that's the whole page bestie, you ate that π
okay byeee, this was Version 2.2.1 of pshbak from the General Commands Manual β go forth and format your cluster output, you absolute main character ππβ¨
π¦ where this page comes from
- debian trixie: python3-hostlist 2.2.1-2 Β· GPL-2.0-or-later
- ubuntu resolute: python3-hostlist 2.2.1-2 Β· GPL-2.0-or-later
- ubuntu stonking: python3-hostlist 2.2.1-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms