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


LSF documentation  | view source Contained in the LSF distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

Top

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

Top

LSF

CONSTRUCTOR

Top

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

Top

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

Top

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

Top

LSF, LSF::Job, bjobs

AUTHOR

Top

Mark Southern (mark_southern@merck.com)

COPYRIGHT

Top


LSF documentation  | view source Contained in the LSF distribution.