Slurm can notify the user by email when certain types of events occur using options such as --mail-type
and --mail-user
.
The emails I receive this way contain a void body and a title that looks like :
SLURM Job_id=9228 Name=toto Ended, Run time 07:32:31, COMPLETED, ExitCode 0
I'd like to configure slurm so that the title or even better the body of the email contains other informations in a similar way of what the slurm command squeue --format
returns.
(actually I'd like the email to contain the comment I set up using sbatch --comment
)
To customise the email sent by Slurm, you typically write a script and set the value of MailProg
to the path to that script in your slurm.conf
.
From the doc, MailProg
is:
Fully qualified pathname to the program used to send email per user request. The default value is "/bin/mail" (or "/usr/bin/mail" if "/bin/mail" does not exist but "/usr/bin/mail" does exist).
The contrib
directory of the Slurm source contains a script written in Perl that you can use and customise: https://github.com/SchedMD/slurm/tree/master/contribs/seff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With