Redirect streams to files

About this task

By default, both standard error messages and standard output messages of interactive tasks are written to stdout on the submission host.

To separate stdout and stderr and redirect to separate files, set LSF_INTERACTIVE_STDERR=y in lsf.conf or as an environment variable.


To redirect both stdout and stderr to different files with the parameter set:
lsrun mytask 2>mystderr 1>mystdout

The result of the above example is for stderr to be redirected to mystderr, and stdout to mystdout. Without LSF_INTERACTIVE_STDERR set, both stderr and stdout will be redirected to mystdout.

See the LSF Configuration Reference for more details on LSF_INTERACTIVE_STDERR.