how to tell when jobs are finished

Nicholas Henke henken at
Wed Aug 1 08:52:42 PDT 2001

I think that might work--- what I am trying to do is start the job via
bpsh or brexec ( to be determined...), from each I can get the pid. I am
wondering what is the RightWay(tm) to tell that the job is no longer
executing. I think wait may work, but I wonder about the scalability of
that. Am I right in assuming that I would need to have a daemon that
monitors the entire list of pids at a certain interval?

Thanks :-)

On Wed, 1 Aug 2001, Sean Dilda wrote:

> On Wed, 01 Aug 2001, Nicholas Henke wrote:
> > Hello--
> > 	I am writing a resource manager based on top of bproc, and I am
> > working on job execution. I am wondering if anyone has any ideas on how to
> > tell when a job is finished executing. The only solution that I have
> > thought of is to wrap the command in a shell script that tells the
> > resource manager that the job is done executing.
> >
> > Any help would be greatly appreciated
> I'm going to assume you're wanting to know how to do this from a
> programming level.  My advice is to save the pid of the job, then use
> waitpid() with the WNOHANG option to check if the job has finished or
> not.  'man 2 wait' for more information on using waitpid().
> If this isn't what you're looking for, please give me more information
> on what exactly you are trying to do and I'll try to help you out.

Nicholas Henke
Undergraduate - SEAS '02
Liniac Project - University of Pennsylvania
work: 215-873-5149
cell/home: 215-681-2705
There's nothing like good food, good beer, and a bad girl.

More information about the Beowulf mailing list