Platform LSF Administration Guide Version 6.2

Mail Notification When a Job Starts
Administering Platform LSF
578
Mail Notification When a Job Starts
When a batch job completes or exits, LSF by default sends a job report by electronic
mail to the submitting user account. The report includes the following information:
Standard output (stdout) of the job
Standard error (stderr) of the job
LSF job information such as CPU, process and memory usage
The output from
stdout and stderr are merged together in the order printed, as if
the job was run interactively. The default standard input (
stdin) file is the null device.
The null device on UNIX is
/dev/null.
bsub mail options
-B
Sends email to the job submitter when the job is dispatched and begins running. The
default destination for email is defined by LSB_MAILTO in
lsf.conf.
-u user_name
If you want mail sent to another user, use the -u user_name option to the bsub
command. Mail associated with the job will be sent to the named user instead of to the
submitting user account.
-N
If you want to separate the job report information from the job output, use the -N
option to specify that the job report information should be sent by email.
Output and error file options (-o output_file, -e error_file, -oo output_file, and -eo error_file)
The output file created by the -o and -oo options to the bsub command normally
contains job report information as well as the job output. This information includes the
submitting user and host, the execution host, the CPU time (user plus system time) used
by the job, and the exit status.
If you specify a
-o output_file or -oo output_file option and do not specify a
-e error_file or -eo error_file option, the standard output and standard error are
merged and stored in output_file. You can also specify the standard input file if the job
needs to read input from
stdin.
The output files specified by the output and error file options are created on the
execution host.
See “Remote File Access” on page 588 for an example of copying the output file back
to the submission host if the job executes on a file system that is not shared between the
submission and execution hosts.
Disabling job
email
If you do not want job output to be sent by mail, specify stdout and stderr as the
files for the output and error options (
-o, -oo, -e, and -eo). For example, the
following command directs
stderr and stdout to file named /tmp/job_out, and
no email is sent.
bsub -o /tmp/job_out sleep 5
On UNIX, If you want no job output or email at all, specify /dev/null as the output
file:
bsub -o /dev/null sleep 5
Example
The following example submits myjob to the night queue:
%
bsub -q night -i job_in -o job_out -e job_err myjob