[ale] Running a command on multiple servers

Richard Bronosky Richard at Bronosky.com
Fri Jun 12 11:05:45 EDT 2009


easiest route:
    for h in host1 host2 host3; do ssh $h 'hostname; date;'; done
...where the command to run is 'hostname; date;'

if you what it to happen simultaneously instead of sequentially, you can do:
    screen
    for h in host1 host2 host3; do screen ssh $h 'top -b;' & done
...each ssh connection will happen is a different screen window. The
caveat is that when to process terminates, the ssh connection/process
stops. When the command screen evoked (ssh) terminates, the window
closes. I don't know how to overcome that off the top of my head. I
tried a few things. Will research more if you like the method.

Finally, there's an app called Cluster SSH, but it requires a GUI, and
I'm too hard to be GUI. Word!

On Fri, Jun 12, 2009 at 10:37 AM, Brandon
Colbert<colbert.brandon at gmail.com> wrote:
> Anyone know of a software that allows you to run a command on multiple
> servers from one host?
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>
>



-- 
.!# RichardBronosky #!.


More information about the Ale mailing list