Re: Consecutive Jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



"Joseph L. Casale" <jcasale@xxxxxxxxxxxxxxxxx> wrote:

>>
It really
is as simple as I wrote out earlier, multiple servers ssh a background job
at
nearly the same time consisting of an rsync command. The destination host
for
this target gets overwhelmed with more than one at a time...
<<

This isn't a complete answer, but a possible approach: I'd use a named pipe
on the destination host. Here's a little experiment to demonstrate.

[user@dhost temp]$ mkfifo pipe
[user@dhost temp]$ while true ; do ` < pipe` ; done

Now, in another xterm:

[user@dhost temp]$ echo date > pipe
[user@dhost temp]$ echo 'ls -l' > pipe

You can 'echo' commands to the pipe in multiple windows; the while loop
will only read and execute one command at a time off the pipe. You can see
where this is going - now your multiple servers just ssh those echo
commands to the destination host and the corresponding commands are
executed.

I'll leave it to you to make it suitably robust if you go this way; you'll
need to add some error handling, possibly signal handling, etc. but that's
just standard shell scripting.

Best,

--- Les Bell
[http://www.lesbell.com.au]
Tel: +61 2 9451 1144


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux