Platform LSF Administration Guide Version 6.2

Chapter 33
External Job Submission and Execution Controls
Administering Platform LSF
503
Working with eexec
About eexec
The eexec program runs on the execution host at job start-up and completion time and
when checkpointing is initiated. It is run as the user after the job environment variables
have been set. The environment variable LS_EXEC_T is set to START, END, and
CHKPNT, respectively, to indicate when
eexec is invoked.
If you need to run
eexec as a different user, such as root, you must properly define
LSF_EEXEC_USER in the file
/etc/lsf.sudoers. See the Platform LSF
Reference for information about the
lsf.sudoers file.
eexec is expected to finish running because the parent job process waits for eexec to
finish running before proceeding. The environment variable LS_JOBPID stores the
process ID of the process that invoked
eexec. If eexec is intended to monitor the
execution of the job,
eexec must fork a child and then have the parent eexec process
exit. The
eexec child should periodically test that the job process is still alive using the
LS_JOBPID variable.
Using esub and eexec to pass data to execution environments
If esub needs to pass some data to eexec, it can write the data to its standard output
for
eexec to read from its standard input (stdin). LSF effectively acts as the pipe
between
esub and eexec (e.g., esub | eexec).
Standard output (
stdout) from any esub is automatically sent to eexec.
Limitation
Since eexec cannot handle more than one standard output stream, only one esub can
use standard output to generate data as standard input to
eexec.
For example, the
esub for AFS (esub.afs) sends its authentication tokens as standard
output to
eexec. If you use AFS, no other esub can use standard output.