SUSE Conversations


Cluster Command Tool



By:

January 16, 2008 9:27 am

Reads:762

Comments:0

Score:Unrated

Print/PDF

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

-------------------------------------------------
0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...


Categories: Free Tools, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

Comment

RSS