How to configure the content of slurm notification emails?

巧了我就是萌 提交于 2020-03-14 17:57:28

问题


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)


回答1:


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




回答2:


You might also be interested in Slurm-Mail: https://github.com/neilmunday/slurm-mail

Slurm-Mail allows you to customise HTML emails sent to users and provides more information than the emails sent by Slurm by default.



来源:https://stackoverflow.com/questions/53003230/how-to-configure-the-content-of-slurm-notification-emails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!