[GE users] SGE questions

Reuti reuti at staff.uni-marburg.de
Thu Mar 1 23:53:28 GMT 2007


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)    
> USE_QSUB_GID=true

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:

#!/bin/sh
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