I would like to submit a job with Platform LSF and have the output placed in a file (bsub -o
), without a job report at the end of it. Using bsub -N
removes the job report from the file, but instead sends the report via e-mail. Is there a way to suppress it completely?
How about redirecting the output of the command to a file and sending the report to /dev/null:
bsub -o /dev/null "ls > job.\$LSB_JOBID.out"
As explained in http://www-01.ibm.com/support/knowledgecenter/SSETD4_9.1.2/lsf_admin/email_notification.dita , you can set the environment variable LSB_JOB_REPORT_MAIL=N at job submission to disable email notification, e.g.:
LSB_JOB_REPORT_MAIL=N bsub -N -o command.stdout command options
How about redirecting the output of the command to a file and sending the report to /dev/null:
bsub -o /dev/null "ls > job.\$LSB_JOBID.out"
I managed to make this work by using the -N switch as suggested to bsub AND suppressing email delivery by using the environment variable:
For (t)csh users:
setenv LSB_JOB_REPORT_MAIL N
For Bourne shell and their variants:
export LSB_JOB_REPORT_MAIL=N
It's a bit convoluted, but it gets the job done.
I can think of two ways to do this. One is a bit of a "sledgehammer" approach, but maybe would work for you.
First, you could set up some email alias that is the email equivalent of /dev/null, and then use the -u option to bsub to send the email report to that user.
Second (the sledgehammer), you could set LSB_MAILPROG in the LSF configuration to point to a sendmail wrapper script that could either a) parse the report and bin it based on certain text matches, or b) bin all email.
Otherwise you're kind of stuck with the header in file indicated by -o.
Use a combination of "-o", "-e", "-N" and "-u /dev/null" on the bsub command line to completely suppress job report and e-mail, e.g.:
$ bsub -N -u /dev/null -o command.stdout -e command.stderr command options
Unfortunately, this would also disable completely any reports of job failures.
/dev/null@localdomain
? My sysadmin really doesn't like that. –
Shipmate © 2022 - 2024 — McMap. All rights reserved.