[Twisted-Python] Running commands / collecting datas via SSH on many machines: Twisted vs plain old scripts ?
suchindra at gmail.com
Wed Dec 10 14:02:25 EST 2008
If you have many machines, then running commands via a shell script
for loop quickly gets un-weildly. Especially since some machines could
be slow in responding since they could be busy, faroff etc or it your
command itself takes a long time to complete.
Doing this in twisted will not only give you better resource
allocation, but it will also be easier to get timeouts and such
things. The twisted ssh implementation probably gives you other things
as well, but I am not aware of them.
Hope that helps.
On Tue, Dec 9, 2008 at 3:55 AM, Alessio Pace <alessio.pace at gmail.com> wrote:
> I have to run commands and (later in time) collect logs from many machines,
> connecting through SSH.
> I was _genuinely_ wondering what an SSH client written in Twisted could give
> me more than executing plain old shell scripts in a for loop.
> From what I saw, given the fact that my run/collect commands remain still
> shell commands (cp, tar, etc...), the only thing that may change is that
> using Twisted I could have a better utilization of resources rather than a
> simple shell for loop in which I iterate in order over all the machines on
> which I have to issue commands.
> Am I missing something? I would like to stress the fact that I'm asking this
> as a very specific question for Twisted usage in the context of
> running/retrieving results on remote machines (as indeed I already happily
> use Twisted for running custom network protocols) and I would right to
> choose a simple but effective solution for this case.
> Thanks in advance,
> Alessio Pace.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
More information about the Twisted-Python