IBM Books

Administration Guide


Using DCEM

The following panels help you to define command specifications:

The General and Options panels provide an interface for creating new command specifications and modifying previously saved command specifications. The Groups and Dynamic Groups panels provide an interface for creating and modifying groups of host machines.

Creating command specifications

DCEM allows you to create, save, and edit command specifications, which reduces your time and effort when you repeatedly run the same command. A command specification consists of the following parts:

General panel

Use the following General panel to specify most of the information that is required to run commands on distributed hosts.


General panelView figure.

To create a command specification, you must provide, at a minimum, the following information in the text fields on this panel:

The following fields, which contain default values, are also required, but are populated with default values:

The following field is optional and has no default:

Options panel

When you create a command specification, you can also change the options for executing the commands on the distributed hosts. Use the following Options panel to view or change options.


Options panelView figure.

The Options panel displays the following options:

Saving a command specification

When you have completed entering your command specification information, click the Save button to save it as a script. Command specifications that you save are stored as Perl scripts (see Appendix A, Example of a saved command script). The saved script contains all the information on the DCEM General and Options panels. Saved command specifications are located in the following directory:

home/dcem/scripts/script file name.pl

home is the home directory of the user under whose name the distributed command is run. script file name.pl is the name of a Perl script file containing a saved command specification.

After you save a command specification, you can run it (see Running a Command on One or More Hosts Running a command on one or more hosts), view it, and select it from the Browse Command Specifications dialog.

Running a command on one or more hosts

You can run commands on multiple hosts using any of the following methods.

From the DCEM dialog

  1. In the General panel, shown below, click the Browse button beside the Name text entry field.


    General panelView figure.

    This displays the Browse Command Specifications dialog.

  2. In the Browse Command Specifications dialog, shown below, select a command specification from the list of existing command specifications, then click the OK button to load the selected command specification into the General and Options panels.


    Browse Command Specifications dialogView figure.

  3. In the DCEM dialog, click the Run button to run the selected command specification on the specified hosts or groups of hosts.

From the DCEM dialog, you can also create a new command specification (see Creating Command Specifications Creating command specifications), then click the Run button to run the selected command specification on the specified hosts or groups of hosts.

Load the command specification from the command line

To load the command specification into the DCEM dialog directly from the command line, type the following:

/opt/csm/dcem/bin/dcem [<command_specification_name>]

Using the dcem command with the command_specification_name option causes DCEM to initialize the input fields in the General and Options panels of the DCEM dialog with specified command data. You can then click the Run button to send the command to the specified hosts.

Run the command specification script on the command line

To run the command specification script directly on the command line, type the following:

<user_home_directory>/dcem/scripts/commandSpecificationName.pl [-debug] [-non_interactive] [-format_output]

Using the Execution Progress Dialog

After you click the Run button to run a valid command specification or command on valid hosts or groups of hosts, DCEM displays the following Execution Progress Dialog to show the status of the command execution on all of the hosts.


Execution Progress DialogView figure.

In this dialog, a series of lists show hosts on which command execution is in one of the following states:

The bottom of the window displays output from the command execution on selected hosts. To display output from a host, select its name from any of the lists. Multiple selections made from the Successful or Failed lists result in combined output in the output window. To view real-time output, select a host that is currently in the working state. The Waiting and Working lists do not support multiple selections.

To stop the distributed command execution on all hosts, click the Stop button. If a command has not been completed on a host, command execution for that host is terminated. Hosts that have been stopped move to the Failed list. Command that have already completed may appear in either the Successful or Failed lists.

When the Show Errors Only check box is selected, the output area displays error messages for the selected hosts. Stdout messages are not displayed.

Selecting the Close button hides the Execution Progress Dialog, but does not stop execution on any hosts. If the DCEM dialog is closed before these hosts have completed execution, then these hosts will be stopped.

Fine-tuning run-time parameters

You can adjust several run-time options for your command using the DCEM Options panel, shown in the following illustration.


DCEM Options panelView figure.

For example, if you are experiencing network problems and you want to improve performance, you can reduce the number of hosts on which the command specification will run at the same time. On the Options panel, the slider and the text box both display this value. The default is 32. Either of these can be modified with a new value between 1 and 64.

Note: When you change this value using the text field, the slider is only updated when the focus changes or the command is saved or run. It does not change as you type or when you press the Enter key.

You can also affect the amount of time it takes for commands to complete by selecting or deselecting the Before running, verify that host will respond check box. Selecting this check box allows you to invest the time to immediately check the host response. If there are problems, the wait time should be smaller than the minute typically taken for the remote shell command to time out.

You can change the default behavior of streaming the output (displaying it in the Execution Progress dialog as it is received) so that the output is collected and displayed for each host only after the command execution completes on that host and it is either in the successful or failed state.

You can also change the remote shell under which the commands run and specify options for that remote shell. The default remote shell is rsh.

Working with groups of hosts

The ability to organize hosts into groups and to save these groups for later use can make it more convenient to run commands on the same groups of hosts repeatedly. Node groups can either be explicit lists of node host names, created by explicitly specifying each host, or they can be dynamic groups of hosts, created by specifying the desired selection criteria, such as "Hostname like 'websrvr%'". To create explicit groups of hosts for use in its command specifications, use the Groups panel in the DCEM dialog. To create dynamic host groups to use in its command specifications, use the Dynamic Groups panel.

Note: By default, the root user has the authority to create groups and a non-root user cannot create groups unless special permission is set for that user. The access authority is defined in the /var/ct/cfg/ctrmc.acls file. You can modify this file, then run the refresh -s ctrmc command to refresh the systems. For more information, see the Security Considerations section of this book.

Groups panel

Use the Groups panel to create explicit groups of hosts. This panel provides an interface for editing, deleting, and copying the groups that you have created. The Group members list box contains a list of hosts that are already in the group.


Groups panelView figure.

Creating groups of hosts

Use the Groups panel to create a group of hosts. To create a group of hosts using the DCEM Groups panel, do the following:

  1. Type the name of the group you are creating in the Group name field.
  2. To add a host to the group, either type its name in the Host names field or select the host from the Hosts in domain list box, then click the Add > button. The hosts listed in the Hosts in domain list box are those hosts defined in CSM that have CSM client code installed.
  3. To add hosts to the group that are not defined in CSM, type the host name in the Host names field, then click the Add > button.
  4. To create the group of hosts, click the Save Group button.

Editing groups of hosts

Use the Groups panel to edit an existing group of hosts. You can select group members to remove host names or add new host names. To edit a group of hosts, do the following:

  1. In the Groups panel, click the Browse button beside the Group name box.
  2. In the displayed Browse Groups dialog, select the group you want to edit.
  3. To add a host to the selected group, either type a host name in the Host names field, or select a host from the Hosts in domain list box, then click the Add > button.
  4. To delete a host from the selected group, select the hosts from the Group members list box, then click the < Remove button.
  5. To save the changes, click the Save Group button.

Copying groups of hosts

Use the Copy Group dialog to copy an existing group of hosts. When you copy a group, you can also add new hosts to the group or remove hosts from the group before you save the copy.


Copy Group dialogView figure.

To copy a group, do the following:

  1. In the Groups panel, select the group you want to copy, then click the Copy Group... button.
  2. In the Copy Group dialog, type the name of the new group in the New group's name field.
  3. To add a host to the new group, either type a host name in the Host names field, or select a host from the Hosts in domain list box. To delete a host from the new group, select the host from the Group members list box, then click the < Remove button.
  4. To save and copy the group, click the Save button.

Deleting groups of hosts

Use the Groups panel to delete existing groups of hosts. To delete a group of hosts, do the following:

  1. In the Groups panel, select the group you want to delete, then click the Delete Group button.
  2. To confirm, click the Delete button in the Deleting Host Groups confirmation dialog. To cancel, click the Cancel button.

Dynamic Groups panel

The Dynamic Groups panel, shown in the following illustration, allows you to create dynamic groups of hosts based on a select (SQL-like) string. This select string is used to search the hosts database to dynamically determine the list of hosts in the group.


Dynamic Groups panelView figure.

Creating a dynamic group of hosts

To create a dynamic group of hosts using the DCEM Dynamic Groups panel, do the following:

  1. Type the name of the group that you are creating in the Group Name field. Alphanumeric characters are allowed.
  2. Type the select string in the SELECT Query field. This is the select string that is used to dynamically determine which nodes belong to this group. The syntax for this select string is determined by the type of node database you are working with (as indicated in the Query syntax box on this panel). If your node database is of rmc type, use the syntax described in IBM RSCT for Linux: Guide and Reference .
  3. To show the hosts that match your specified selection criteria after you specify a valid select string, click the Browse Hosts button.
  4. To create the group of hosts, click the Save Group button.

Displaying dynamic group host Members

To view host members of an existing dynamic group, do the following:

  1. In the Dynamic Groups panel, click the Browse Groups button to display the Browse Groups dialog.
  2. In the Browse Dynamic Groups dialog, select the dynamic group you want to view from the list of dynamic groups in the dialog. After you select the dynamic group, you are returned to the Dynamic Groups panel where the Group name field is filled in with the name of the selected group, and the SELECT Query field displays the chosen dynamic group's select string.
  3. To view the hosts members of the selected dynamic group, click the Browse Hosts button beside the SELECT Query text field. The nodes that match the select string and that belong to the dynamic group are displayed.

    You can also use this feature to view hosts that satisfy the SELECT Query before actually creating a group. To do this, type the select string you want to use, then click on the Browse Hosts button. To view hosts matching a select string, you do not need to provide a group name.

Editing a dynamic group

Just as you cannot create a dynamic group by explicitly adding hosts to the group, you cannot edit a dynamic group by explicitly adding or removing hosts from the group. The only characteristic you can change about a dynamic group is its select string.

To edit an existing dynamic group, do the following:

  1. In the Dynamic Groups panel, click the Browse Groups button to display the Browse Groups dialog.
  2. In the Browse Groups dialog, select the dynamic group you want to edit.
  3. In the SELECT Query field modify query. You can check the hosts members that will belong to the group, as defined by your select string, by clicking on the Browse Hosts button.
  4. To save the selected dynamic group with its edited select string, click on the Save Group button.

Copying a dynamic group

To copy a dynamic group, do the following:

  1. In the Dynamic Groups panel, click the Browse Groups button to display the Browse Groups dialog.
  2. Select the dynamic group you want to copy by selecting a dynamic group from the list in the Browse Dynamic Groups dialog.
  3. In the Dynamic Groups panel, edit the Group name text field with the desired name of the new group.
  4. To save the new group click on the Save Group button to finish copying the group.

Deleting a dynamic group

To delete a dynamic group, do the following:

  1. In the Dynamic Groups panel, click the Browse Groups button to display the Browse Groups dialog.
  2. In the Browse Dynamic Groups dialog, select the dynamic group you want to delete.
  3. In the Dynamic Groups panel, click on the Delete Group button to delete the chosen dynamic group.

Defining a SELECT query string

You can write your own SQL queries to determine specific dynamic grouping criteria. By specifying the resource attribute in the SQL query, you can create a group on which a command can be run. For more information, see Setting up node group information.

Command output and activity logs

DCEM command output and activity are saved in log files. Log files are stored in the following directory:

home/dcem/log/log file name

home is the home directory of the user under whose name the distributed command is run. log file name is the name of the log file containing the dcem command activity. All DCEM command activity of failures and successes are saved in this log file.

The default log file name is dcem1.log. The default maximum size for a log file is 10M. When dcem1.log is full, it is renamed to dcem2.log. New log entries are always written to dcem1.log.

The following is an example of DCEM log file contents:

TIME:     Sep 20 18:55:57.076
INFO:     Command Name:listing
Command: ls -l
Successful Machines: wsm14 wsm12 wsm06 wsm04 wsm15 wsm03
Failed Machines: wsm01 wsm00
 
 
TIME:     Oct 08 11:32:10.868
INFO:     Command Name:DiskSpace
command: df
Successful Machines: endive.austin.ibm.com
Failed Machines: westwing.austin.ibm.com


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]