I have PBS set to send emails at beginning and end of a job submission.
The default content of those emails is as follows:
Body of first email…
PBS Job Id: 10.pbs01
Job Name: STDIN
Begun execution
Body of email at end of job…
PBS Job Id: 10.pbs01
Job Name: STDIN
Execution terminated
Exit_status=0
resources_used.cpupercent=0
resources_used.cput=00:00:00
resources_used.mem=5600kb
resources_used.ncpus=1
resources_used.vmem=408320kb
resources_used.walltime=00:00:22
I’d like to customize the body of each of these emails to also include the “exec_host =” value(s). Is it possible for me to add this information? If so, how?
We cannot customise this . The default content would remain the same.
However, you can use the pure epilogue script or Mom hook events (execjob_epilogue/execjob_end) to send customized mail.
I’ve found the documentation for the epilogue script (9.3.7.3.i on AG-425/pg609 of PBS big book 19.2.3) but I don’t have an epilogue script in $PBS_HOME/mom_priv/
I’ve found such a script in our old xcat deployment code in torque/scripts/epilogue
Would they be the same? Is there meant to be a default epilogue script at $PBS_HOME/mom_priv/epilogue?
My actual question is more about how to change the “job started” email template - I presume I could make an $PBS_HOME/mom_priv/prologue?
Might be same.
For PBS Pro, these are the arguments values to the epilogue script
# $Id: epilogue
# $1 = job id
# $2 = user name
# $3 = group name
# $4 = job name
# $5 = session id
# $6 = requested resource limits
# $7 = resources used
# $8 = queue name
# $9 = account string
# $10 = exit code from job
No, it has to be composed by the cluster admin as per their requirements.
Job started would have many options – jobs approved by runjob hook, jobs that have reached prologue.
I don’t know that you have strictly answered my question (“how to change the “job started” email template”) but I think that’s because what you were trying to say was ‘judging what “job started” means is hard, here is the list of possible definitions’.
If I was to look into the file tree, where would I find the job started email template? From what I can tell, these email messages are hard-coded (!) so the answer is definitively there are no templates, I will need to use a hook and make the decision on which hook to use.