[Twisted-Python] Running commands / collecting datas via SSH on many machines: Twisted vs plain old scripts ?
alessio.pace at gmail.com
Thu Dec 11 02:41:26 EST 2008
On Wed, Dec 10, 2008 at 8:02 PM, Suchindra Sandhu <suchindra at gmail.com>wrote:
> Hi Alessio,
> 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.
yes this confirm my "feeling". The fact is that I don't know if in Twisted I
can easily do ssh proxying, as I use to do now configuring my
.ssh/ssh_config file.. That's why for simplicity I fell back to plain
scripts calling ssh.
But I would like to switch to Twisted for the aforementioned reasons.
> On Tue, Dec 9, 2008 at 3:55 AM, Alessio Pace <alessio.pace at gmail.com>
> > Hi,
> > I have to run commands and (later in time) collect logs from many
> > connecting through SSH.
> > I was _genuinely_ wondering what an SSH client written in Twisted could
> > 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
> > simple shell for loop in which I iterate in order over all the machines
> > which I have to issue commands.
> > Am I missing something? I would like to stress the fact that I'm asking
> > as a very specific question for Twisted usage in the context of
> > running/retrieving results on remote machines (as indeed I already
> > 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
> > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python