Cluster Command Tool
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:
- Download the cct tarball
- Extract the tarball
- Move the cct/cmd command to /usr/local/bin or /root/bin
- Edit the HOST_LIST variable in the cmd command to include the hosts in your cluster
- Copy the modified cmd command with the correct HOST_LIST to all nodes in the cluster
tar zxvf cct*tgz
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 -------------------------------------------------
Related Articles
Feb 21st, 2023
No comments yet