dshbak Command

This command is part of the IBM® Distributed Shell Management (DSM) software. The command is located at the /opt/ibm/sysmgt/dsm/bin/dshbak location.

Purpose

Presents formatted output from the dsh command.

Syntax

dshbak [-c | -x]

Description

The dshbak command formats output from the dsh command. The syntax of the dshbak command is as follows:

host_name: line of output from remote command

The dshbak command formats the lines and writes them to the standard output as follows. The assumption is that the output from host_name3 and host_name4 are identical, and the -c flag is specified.
 HOSTS --------------------------------------------------------
           host_name1
           --------------------------------------------------------------
           .
           .
           lines from dsh with host_names stripped off
           .
           .
           HOSTS --------------------------------------------------------
           host_name2
           --------------------------------------------------------------
           .
           .
           lines from dsh with host_names stripped off
           .
           .
           HOSTS --------------------------------------------------------
           host_name3             host_name4
           --------------------------------------------------------------
           .
           .
           lines from dsh with host_names stripped off
           .
           .

The host names are displayed alphabetically, if the output is displayed from more than one node in a collapsed form. The output is sorted alphabetically by host name, if the output is not collapsed. The dshbak command writes "." for each 1000 lines of output filtered.

If the -x flag is specified, the extra header lines that dshbak command displays for each node is excluded. The dshbak command sorts the output using the node name to view the content:

host_name1: lines from dsh started
           .
           .
           lines from dsh continued
           .
           .
           lines from dsh ended
           host_name2: lines from dsh started
           .
           .
           lines from dsh continued
           .
           .
           lines from dsh ended

Flags

Item Description
-c Collapses identical output from more than 1 node to display the output at one time.
-x Excludes the extra header lines that dshbak displays for each node. This flag provides compact output, and dshbak command sorts the output by node name to view the content. The flag must not be used with -c.

Security

Note: You must run the kinit command to obtain a ticket-grant-ticket before running the Kerberos Version 5 remote commands. The additional security considerations are like that of the remote shell command.

Examples

  1. To display the results of a command issued on several nodes, in the format used in the Description, enter the following command:
    dsh -n node1,node2,node3 cat /etc/passwd | dshbak
  2. To display the results of a command issued on several nodes with identical output, enter the following command:
    dsh -w host1,host2,host3 pwd | dshbak -c
  3. To display the results of a command issued on several nodes with compact output, enter the following command:
    Note: The output is sorted alphabetically by host name.
    dsh -w host1,host2,host3 date | dshbak -x

Standard Error

The error messages on standard error is displayed before all standard output messages, if the dshbak filter is used. This behaviour is true with and without the -c flag.