Cluster Command Tool

Share

Usage:

cmd <command> or cmd ‘<command> | <command>’

Detailed Description:

Cluster administration is easier if you understand what each node in the cluster understands regarding important configuration files or settings. The Cluster Command Tool allows the administrator to run a command from one node that is executed on each and every node in the cluster. This way the command’s output is seen from each node’s point of view.

Installation:

  1. Download the cct tarball
  2. Extract the tarball
  3. tar zxvf cct*tgz

  4. Move the cct/cmd command to /usr/local/bin or /root/bin
  5. Edit the HOST_LIST variable in the cmd command to include the hosts in your cluster
  6. Copy the modified cmd command with the correct HOST_LIST to all nodes in the cluster

If you don’t want to type every server’s password every time you run a command, then configure all the nodes as trusted secure hosts. All nodes should be trusted by one another. Make sure that each node also trusts itself. Trusted hosts are configured with the command:

ssh-keygen -t rsa

Do not specify a password. Copy the public key to each server’s /root/.ssh/authorized_keys file, including the server’s own public key.

Sample Output:

For example, if you wanted to know the time on each server, you can run `cmd date` to see the time from each server’s perspective.

Cluster Command Tool v0.42-2
-------------------------------------------------
This Node: node1
All Nodes: node1 node2
=================================================

Node: node1, Command: date
Wed Jan 16 08:56:39 MST 2008
Exit Status: 0

-------------------------------------------------
Node: node2, Command: date
Wed Jan 16 08:56:40 MST 2008
Exit Status: 0

-------------------------------------------------
(Visited 1 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet

Avatar photo
7,877 views