Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure the content of slurm notification emails?

Tags:

slurm

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)

like image 714
Johann Bzh Avatar asked Oct 26 '18 07:10

Johann Bzh


1 Answers

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

like image 138
damienfrancois Avatar answered Nov 08 '22 15:11

damienfrancois