The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

LSF::JobHistory - get historical information about LSF jobs.

SYNOPSIS

use LSF::JobHistory;

use LSF::JobHistory RaiseError => 0, PrintError => 1, PrintOutput => 0;

( $jobhistory ) = LSF::JobHistory->new( [ARGS] );

( $jobhistory ) = LSF::JobHistory->new( $job );

( $jobhistory ) = LSF::JobHistory->new( [JOBID] );

@jobhistory = LSF::JobHistory->new( -J => '/MyJobGroup/*');

( $jobhistory ) = LSF::JobHistory->new($job);

$jobhistory = $job->history;

... etc ...

$exit_status = $jobhistory->exit_status;

$pid = $jobhistory->pid;

$command = $jobhistory->command;

$cwd = $jobhistory->cwd;

DESCRIPTION

LSF::JobHistory is a wrapper arround the LSF 'bhist' command used to obtain historical information about jobs. See the 'bhist' man page for more information. This provides a more reliable way to obtain the exit status of an LSF job than from the LSF::JobInfo object because the bhist command can search all of the available LSF logs to find the information.

INHERITS FROM

LSF

CONSTRUCTOR

new( [ARGS] || [JOBID] || $job );

($jobhistory) = LSF::JobHistory->new( [ARGS] || [JOBID] );

Creates a new LSF::JobHistory object.

Arguments are the LSF parameters normally passed to 'bhist' or a valid LSF jobid or LSF::Job object. The bhist command is automatically called with the -n 0 and -l flags.

Returns an array of LSF::JobHistory objects. Of course if your argument to new is a single jobid then you will get an array with one item. If you query for a number of jobs with the same name or path then you will get a list. In scalar context returns the number of jobs that match that criteria.

BUGS

Please report them. Otherwise... the parsing of the LSF output can fail if the job names have non-alphanumeric characters in them. You probably shouldn't do this anyway.

HISTORY

The LSF::Batch module on cpan didn't compile easily on all platforms i wanted. The LSF API didn't seem very perlish either. As a quick fix I knocked these modules together which wrap the LSF command line interface. It was enough for my simple usage. Hopefully they work in a much more perly manner.

SEE ALSO

LSF, LSF::Job, bjobs

AUTHOR

Mark Southern (mark_southern@merck.com)

COPYRIGHT

Copyright (c) 2002, Merck & Co. Inc. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)

1 POD Error

The following errors were encountered while parsing the POD:

Around line 155:

You forgot a '=back' before '=head1'