How to program in Python to run system commands in 1000s of servers

Chris Angelico rosuav at gmail.com
Sun Apr 10 10:42:22 EDT 2011


On Mon, Apr 11, 2011 at 12:22 AM, Babu <babukk at gmail.com> wrote:
> Are there any more different approaches?  I suppose if we take the
> daemon approach then we can make it as a webservice as well?

Yes, your daemon could function via HTTP. But if you go that route,
you would need some way to collect all the different computers'
results.

For example, suppose you build your daemon to respond to HTTP requests
on port 8000, with a document name like "/status". You could then
retrieve _one_ computer's status by pointing your browser to
http://computername/status - but that's only one. You would then need
a wrapper somewhere to collect them, for instance:


<iframe src="http://computer1/status"></iframe>
<iframe src="http://computer2/status"></iframe>
<iframe src="http://computer3/status"></iframe>

etc. If you're always getting status on the same set of computers (or
a few standard sets of computers), this could be a simple .HTML file
that you have on your hard disk; otherwise, you may want to consider
another web server that lets you tick which ones to query, and builds
an iframe list from your selections.

Chris Angelico



More information about the Python-list mailing list