> Am 28.02.2017 um 21:49 schrieb Mishkin Derakhshan <mishkin...@gmail.com>: > > Thank you. I appreciate your patience while I wrap my head around this stuff. > > On Sun, Feb 26, 2017 at 12:25 PM, Reuti <re...@staff.uni-marburg.de> wrote: >> >> Am 26.02.2017 um 22:42 schrieb Mishkin Derakhshan: >> >>> Okay thanks. It would be nice to get at least the same information >>> from as a non-admin email (i.e., user, queue, start/end time). >>> Another bit of useful information for both admin and non-admin in my >>> case would be the job name. >> >> Did you have a look at the "-m" and "-M" option to `qsub`, or are you >> referring only to emails send in case of an error? > Yes, use the -m and -M options already, but those haven't helped me > add more/less content to the body of the email. > > So the specific one I'm asking about now is only for emails in case of > error, though it would be nice to customize what goes into any/all > emails.
When they are send from the exechost: yes, it can be done. All will use the defined wrapper. It's the duty of the script to determine whether it's a usual mal to the user or an admin mail and act accordingly. > >> "-M" accepts more than one receiver, or you could hardcode in a mail wrapper >> to send the same email in addition to the admin user all the time or add >> additional information: >> >> #!/bin/bash >> tee >(mail -s "$2" "$3") >(mail -s "$2" another_user) | mail -s "$2" >> sge_admin >> { echo Custom header; cat; echo Custom footer } | tee >(mail -s "$2" "$3") >> >(mail -s "$2" another_user) | mail -s "$2" sge_admin >> >> and define it in: >> >> $ qconf -sconf >> … >> mailer /usr/sge/cluster/mailer.sh > > So I'm wondering if there is a way for my custom mailer script to > parse the job number from the subject line (GE 6.2u5p3: Job 66839 > failed), and then use that to get more information. Kind of like using > `qstat -j 66839`, except the problem I see with that is that because > the job failed I'm guessing it will no longer be available to qstat. > Any way around this? > >> >> I even add some information of the job's context (`qsub -ac …`) to the >> outgoing mail to the user, e.g. the list of used nodes of a parallel job. > Just so I understand, does all the information that is part of the > job's context get sent to outgoing mail to the user? Does that cover > all -m scenarios (i.e., beas), but not the case of a failed job where > an admin email is sent? It's a custom scripting solution and not the default. But I wanted to point out that the content in the usual emails send to the user (from the exechosts) can be changed/extended. I can send you more information when you would like to implement it. This will also work for the admin mails, when they indicate a job error (in this case they are send from the exechost where they tried to start too [like error: can't open output file "/home/blabla"]). Note that the custom setting for a node (i.e. something like `qconf -mconf node28` will only be read after some delay or when `qconf -mconf` is changed [removing a blank is sufficient]) - at least to my experience. -- Reuti
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ users mailing list users@gridengine.org https://gridengine.org/mailman/listinfo/users