4

Please recommend me a good terminal multiplexer. I'm new to sys admin work and need a good way to mange multiple boxes.

Edit: Just be clear, I'm looking for something like PuTTy that can send commands to multiple boxes at once.

Usage example: Installing an rpm on 10 different boxes. It's tedious to have to do each one manually.

4 Answers4

5

GNU Screen was invented just for this, it is indispensible and I use it every day.

Also Tmux has been getting a lot of attention lately, it is a lightweight version of screen.

Stefhen
  • 143
  • 2
  • 8
4

A comprehensive best practice answer covering the management of multiple systems using methods like puppet, cfengine, Spacewalk, Kickstart, and other integral utilities would be appropriate.

Instead, I'll example the benefits of creating your own with:

for H in `hosts`
do
     ssh $H "# do things and stuff ; yum -y update"
done

Thankfully, I've also covered the first one here:

Managing an application across multiple servers, or PXE vs cfEngine/Chef/Puppet

Warner
  • 23,440
  • 2
  • 57
  • 69
3

I think Cluster SSH works best in these situations. You get individual windows for each server, but a dialog transmits all of your keystrokes to all servers.

That way, if your 'rpm' command bombs out on one server, you can click on that server and investigate/resolve the issue.

http://sourceforge.net/projects/clusterssh/

oo.
  • 851
  • 6
  • 11
  • I've found SSH pipes to be better suited for managing multiple servers. While novel, this technology is fallible and less flexible. – Warner Mar 31 '10 at 13:37
1

I use dancer-shell on a small cluster, which can execute shell commands in parallel on a list of hostnames. If you have a lot of systems, dsh can be impeded by network throughput. It offers a tree topology option to have hosts call hosts and so-on, as long as they all have dsh installed.

Dsh is nice, but it has some drawbacks. If your network or systems are busy, failure will occur, leaving you with some systems in one state and other systems in another. You can try to write idempotent commands and just keep running it until everything comes back ok, I guess. But the common solution is to have some sort of agent which tries to bring the system from it's current state to the existing one; this approach allows it to retry if a transient network error occurs. This is the approach cfengine/puppet/chef take to varying degrees.

jldugger
  • 14,122
  • 19
  • 73
  • 129