Re: A question about subprocess



Thanks very much for all the answers.

JD

On Oct 3, 6:24 pm, Dan Stromberg <dstrombergli...@xxxxxxxxx> wrote:
You don't necessarily need thesubprocessmodule to do this, though you
could use it.

I've done this sort of thing in the past with fork and exec.

To serialize the jobs on the machines, the easiest thing is to just send
the commands all at once to a given machine, like "command1; command2;
command3".

You can use waitpid or similar to check if a series of jobs has finished
on a particular machine.

An example of something similar can be found athttp://stromberg.dnsalias.org/~strombrg/loop.html

(If you look at the code, be kind. I wrote it long ago :)

There's a benefit to saving the output from each machine into a single
file for that machine. If you think some machines will produce the same
output, and you don't want to see it over and over, you can analyze the
files with something likehttp://stromberg.dnsalias.org/~strombrg/equivalence-classes.html.

On Wed, 03 Oct 2007 16:46:20 +0000, JD wrote:

Hi,

I want send my jobs over a whole bunch of machines (using ssh). The
jobs will need to be run in the following pattern:

(Machine A) (Machine B) (Machine C)

Job A1 Job B1 Job C1

Job A2 Job B2 etc

Job A3 etc

etc

Jobs runing on machine A, B, C should be in parallel, however, for
each machine, jobs should run one after another.

How can I do it with thesubprocess?

Thanks,

JD


.



Relevant Pages

  • Re: Printing from Solaris
    ... >> Try issuing 100 lp commands for that printer very quickly, ... >> in a script. ... You'll find that a few of the jobs become stuck on ... There are some software packages that let print jobs build up ...
    (comp.unix.solaris)
  • Re: IEE345I command authority error from batch
    ... jobs set up to issue MVS Modify commands to CICS. ... It could be that your JES parms no longer allow commands from batch jobs, or that the OPERPARM segment for the user has the wrong authority level specified. ...
    (bit.listserv.ibm-main)
  • Re: A question about subprocess
    ... You don't necessarily need the subprocess module to do this, ... I've done this sort of thing in the past with fork and exec. ... To serialize the jobs on the machines, the easiest thing is to just send ... the commands all at once to a given machine, ...
    (comp.lang.python)
  • Re: How can I send shell-commands to the web-server in webcontrols?
    ... external process handle the jobs. ... while the Windows Service can run with the necessary permissions. ... 'Adding them to a joblist' means that these commands are stored in a listbox ... The joblist should be executed on the webserver then. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: How can I send shell-commands to the web-server in webcontrols?
    ... I think a Windows Service is likely the best place to execute such batch jobs. ... The web site can communicate with the Windows Service as needed through a database or common config file. ... 'Adding them to a joblist' means that these commands are stored in a listbox ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)