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: Question on SDSF/JES2
    ... Edward Jaffe wrote: ... I've been pondering this and I'm not sure why SDSF prevents MVS commands from being issued against jobs assigned the PROTECTED attribute by JES2. ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • 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: zfs: Fatal trap 12: page fault while in kernel mode
    ... jobs is hanging, cannot be killed, even not with -9. ... zfs commands are hanging and cannot be killed, ... I will leave the machine running in this ...
    (freebsd-current)
  • Re: zfs: Fatal trap 12: page fault while in kernel mode
    ... jobs is hanging, cannot be killed, even not with -9. ... zfs commands are hanging and cannot be killed, ...
    (freebsd-current)