Sending commands to multiple Linux and Solaris machines through a single graphical shell window

I have been a long time user of clusterssh, which is a fanstastic tool for sending commands to multiple hosts. Inside each terminal window you can type a command, or you can use the master console to send a command to all of the windows you opened. The clusterit tools comes with a similar tool, dvt, which is quite similar to clusterssh. Dvt uses the CLUSTER variable just like dsh and company, and has a master console that allows you to send commands to each server in that list. To use dvt, you will first need to create a list of hosts you want to connect to:

$ cat /home/matty/cluster/nodes
foo1 foo2 foo3

Once you have a list of hosts, you will need to export this list through the CLUSTER variable:

$ export CLUSTER=/home/matty/cluster/nodes

After these two items have been completed, you can run dvt to create an xterm on each server (click here to see what this looks like). You can then type in each terminal window, or use the master window to send the same command to all of the windows you have opened. This is another awesome tool that every SysAdmin should have in their tool belt, and it’s easy to install clusterit!

This article was posted by Matty on 2010-05-29 09:15:00 -0400 EDT