Thanks, that worked!
even though results are a bit inconsistent when trying to send several
mails in a single script.
El 11/03/13 16:43, Reuti escribió:
Hi,
Am 11.03.2013 um 15:52 schrieb Txema Heredia Genestar:
This morning I have realized that I do not always receive mails sent from my
jobs. I have been toying around with this script:
#!/bin/bash
echo "sleep 1" | /bin/mail -s "sleep ${1}" ${LOGNAME} ;
sleep 60;
echo "awake 2" | /bin/mail -s "awake ${1}" ${LOGNAME} ;
sleep 10;
echo "test 3" | /bin/mail -s "test ${1}" ${LOGNAME} ;
###sleep 1;
The mail interface will fork at some point the maildrop process. When the job
finishes the remaining processes will be killed by intention by SGE - if it
happens too fast, the mail ist never send as you observed.
What you can try is something like:
echo "test 3" | /bin/mail -S sendwait -s "test ${1}" ${LOGNAME} ;
-- Reuti
If I submit this script, I only receive the 2 first mails, but never the third
one. But if I uncomment the last sleep line, I do receive the third email.
I have been playing further around this and it seems that, If a mail is the last command issued by
a job, or if it is followed by some "fast" command I still don't receive the 3rd mail.
But if the last mail command is followed by some "longer" command , I do receive them. A
few examples:
No mail:
- ls
- ls > /dev/null
- exit 0
- sleep 0
- hostname
- hostname (2x) & (3x)
Receive mail:
- sleep 1
- top -b -n 1
- hostname (4+x)
A few additional twists:
- If I log into the node and run the script, I receive everything.
- "ssh node script" I also receive all mails
- If there is a epilog script, the epilog is able to send mails even if the job
failed to send the 3rd one.
Any ideas of what is causing this? Is this a bug of SGE or a missconfiguration
of my system?
Thanks,
Txema
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users