[GE users] SGE questions

john.li at mindspeed.com john.li at mindspeed.com
Fri Mar 2 00:24:05 GMT 2007

Great and thanks very much.   The queue terminate_method solution will 
work for me.

Thanks again.

Reuti <reuti at staff.uni-marburg.de> 
03/01/07 03:53 PM
Please respond to
users at gridengine.sunsource.net

users at gridengine.sunsource.net

Re: [GE users] SGE questions

Am 01.03.2007 um 19:24 schrieb john.li at mindspeed.com:

> Actually, I used qconf -mconf to add the statement below,
> execd_params                 NOTIFY_KILL=INT,USE_QSUB_GID=true
> This is how I know of sending a INT to a job.   I wish I could say,
> execd_params                 NOTIFY_KILL=(INT TERM) 

After the -sigint (by -notify) is send, the -sigkill will happen 
after the defined time in the queue definition. Are you looking for a 
three step process:

1) sigint

2) sigterm

3) sigkill

which is not available? Both -sigint and -sigterm could be trapped, 
which would be odd. The only two signals which can't be trapped are - 
sigkill and -sigstop (for a good reason).

> so that SGE will first send INT, then send TERM to complete killing 
> a job.
> For your suggestion,
> b) use a custom terminate_method, which will send a signal of your
> choice, wait some seconds and send the sigkill (both to the
> processgroup i.e.: kill -2 -- -$job_pid)
> Would you provide me some detail as where and how to implement this?

If you set in the queue definition:

terminate_method      /usr/sge/tools/shutdown $job_pid

with a procedure like:

kill -sigint -- -$1
sleep 120
kill -sigterm -- -$1
sleep 120
kill -sigkill -- -$1
exit 0

you should get the desired behavior.

-- Reuti

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list