Performing tasks concurrently on multiple servers

Command routing allows you to route commands to one or more servers for processing and then collect the output from these servers.

About this task

To route commands to other servers, you must have the same administrator ID and password as well as the required administrative authority on each server to which the command is being routed. You cannot route commands to other servers from the server console.

After the command has completed processing on all servers, the output displays, in its entirety, for each server. For example, the output from SERVER_A displays in its entirety, followed by the output from SERVER_B. The output includes summary messages for each individual server and identifies which server processed the output. Return codes indicate whether commands processed on the servers successfully. These return codes include one of three severities: 0, ERROR, or WARNING.

Each server that is identified as the target of a routed command must first be defined using the DEFINE SERVER command. The command is automatically routed to all servers specified as members of a server group or to individual servers specified with the command.

The following examples describe how to route the QUERY STGPOOL command to one server, multiple servers, a server group, multiple server groups, or a combination of servers and server groups. Each server or server group in a list must be separated with a comma, without spaces.

Routing commands to a single server

Procedure

To route the QUERY STGPOOL command to a server named ASTRO, enter:
astro: query stgpool
The colon after the server name indicates the end of the routing information. This is also called the server prefix. Another way to indicate the end of routing information is to use parentheses around the server name, for example:
(astro) query stgpool

Routing commands to multiple servers

About this task

Procedure

To route the QUERY STGPOOL command to multiple servers named HD_QTR, MIDAS, SATURN, enter:
hd_qtr,midas,saturn: query stgpool

If the first server has not been defined to Tivoli Storage Manager, the command is routed to the next defined server in the list of servers.

You can also enter the command this way:
(hd_qtr,midas,saturn) query stgpool

Routing commands to a server group

About this task

In this example, the server group ADMIN has servers named SECURITY, PAYROLL, PERSONNEL defined as group members. The command is routed to each of these servers.

Procedure

To route the QUERY STGPOOL command to the server group named ADMIN, enter:
admin: query stgpool
You can also enter the command this way:
(admin) query stgpool

Routing commands to server groups

About this task

In this example, the server group ADMIN2 has servers SERVER_A, SERVER_B, and SERVER_C defined as group members, and server group ADMIN3 has servers ASTRO, GUMBY, and CRUSTY defined as group members. The command is routed to servers SERVER_A, SERVER_B, SERVER_C, ASTRO, GUMBY, and CRUSTY.

Procedure

To route the QUERY STGPOOL command to two server groups that are named ADMIN2 and ADMIN3, enter:
admin2,admin3: query stgpool

You can also enter the command this way:

(admin2,admin3) query stgpool

Routing commands to two servers and a server group

About this task

In this example, the server group DEV_GROUP has servers SALES, MARKETING, and STAFF defined as group members. The command is routed to servers SALES, MARKETING, STAFF, MERCURY, and JUPITER.

Procedure

To route the QUERY STGPOOL command to a server group named DEV_GROUP and to the servers named MERCURY and JUPITER, enter:
dev_group,mercury,jupiter: query stgpool

You can also enter the command this way:

(dev_group,mercury,jupiter) query stgpool

Routing commands inside scripts

About this task

When routing commands inside scripts, you must enclose the server or server group in parentheses and omit the colon. Otherwise, the command will not be routed when the RUN command is issued, and will only be run on the server where the RUN command is issued.

For example, to route the QUERY STGPOOL command inside a script:

Procedure

  1. Define a script called QU_STG to route it to the DEV_GROUP server group.
    define script qu_stg "(dev_group) query stgpool"
  2. Run the QU_STG script:
     run qu_stg

Results

In this example, the server group DEV_GROUP has servers SALES, MARKETING, and STAFF defined as group members. The QUERY STGPOOL command is routed to these servers.