ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/pjob/pjob.c
Revision 1.6 - (view) (annotate) - [select for diffs]
Mon Jan 30 21:46:59 2006 UTC (18 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +11 -0 lines
Diff to previous 1.5 , to selected 1.3
Implemented the use of hard/soft limits. Need to start autoconfing around
stuff like that

Revision 1.5 - (view) (annotate) - [select for diffs]
Wed Jan 25 20:05:52 2006 UTC (18 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 , to selected 1.3
Whoops - broke all output :)

Revision 1.4 - (view) (annotate) - [select for diffs]
Wed Jan 25 19:57:12 2006 UTC (18 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.3: +21 -3 lines
Diff to previous 1.3
Added timers on a per job basis - it will now also give the exit code of the job

The child pids now have a PPID of the pjob processes, rather than 1.

Left timers on the todo list, as i may add a timer for the overall pjob - to
include in the summary at the end.

Revision 1.3 - (view) (annotate) - [selected]
Tue Jan 24 20:15:25 2006 UTC (18 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.2: +8 -3 lines
Diff to previous 1.2
More TODO's

Started implementing timers - it does time it - it just does nothing with it :)

Revision 1.2 - (view) (annotate) - [select for diffs]
Mon Jan 23 22:12:39 2006 UTC (18 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.1: +9 -22 lines
Diff to previous 1.1 , to selected 1.3
-Wall fixes - including 1 or 2 bugs :) - Thanks to Tim for this one.

Revision 1.1 - (view) (annotate) - [select for diffs]
Mon Jan 23 11:16:32 2006 UTC (18 years, 2 months ago) by pajs
Branch: MAIN
Diff to selected 1.3
Initial version of pjob, a parrallel job runner. (Or Petes job).

Program takes a command, and X arguments. It will run the command with
argument x in parralle, up to Y number of jobs at once. It allows
command substitution, and with an argument file will take several
arguments.

The most basic example is:

pjob -c /bin/echo Azz Pete Tim Fred

This would run '/bin/echo Azz', '/bin/echo Pete' etc etc in parrallel.
A slighltly more detailed example:

pjob -f 'HOSTNAME' -c 'ssh HOSTNAME uptime' myrtle raptor swallow.

This would run

'ssh myrtle uptime', 'ssh raptor uptime', 'ssh swallow uptime' in
parrallel.

A slightly more complex example:

A datafile of:

elm 192.168.0.53 kent.ac.uk
swift 192.168.0.34 ukc.ac.uk
otter 192.168.0.116 ukc.ac.uk

run with the command
pjob -f 'name ip domainname' -c 'adddns -h name -i ip -d domainname' -a datafile

would run

adddns -h elm -i 192.168.0.53 -d kent.ac.uk
adddns -h swift -i 192.168.0.34 ukc.ac.uk
etc etc

pjob be default output all data to the screen with a jobname prefix, and also a [out] or [err] prefix showing
if the output as on stdout or stderr. A stdin file can be specified, and pjob will open this file, and write
its contents into the stdin of the jobs it executes.

Command arguments seem to be a bit unpopular - so may be changed.

Convenience Links

Links to HEAD: (view) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a