[asterisk-dev] policy change for correct handling of fatal program conditions

Paul Hewlett paul at gccs.co.za
Wed Jan 24 00:42:10 MST 2007


On Tuesday 23 January 2007 21:32, Tzafrir Cohen wrote:
> On Tue, Jan 23, 2007 at 05:33:42PM +0200, Paul Hewlett wrote:
> > There was kernel patch that allowed one to exempt ceratin processes from
> > the OOM killer - I don't think it made it into the main tree however.
> > asterisk would be a candidate for this.
>
> I think it has:
> tzafrir at boomtime:~$ ls -l /proc/self/oom_*
> -rw-r--r-- 1 tzafrir tzafrir 0 2007-01-23 21:30 /proc/self/oom_adj
> -r--r--r-- 1 tzafrir tzafrir 0 2007-01-23 21:30 /proc/self/oom_score
> tzafrir at boomtime:~$ grep . /proc/self/oom_*
> /proc/self/oom_adj:0
> /proc/self/oom_score:886

Great - did not realise it was in. To bar asterisk from being killed by the 
oom_killer find the pid of asterisk

     PID=`cat /var/run/asterisk.pid`

and set the oom_adj value to -17

     echo "-17" > /proc/${PID}/oom_adj


Paul

-- 
Paul Hewlett  Technical Director 
Global Call Center Solutions Ltd, 2nd Floor, Milnerton Mall
Cnr Loxton & Koeberg Roads, 7435 Milnerton
paul at gccs.co.za  www.gccs.co.za
Tel: +27 86 111 3433 Fax: +27 86 111 3520 Cel: +27 76 072 7906
Gizmo: 1 747 659 6171



More information about the asterisk-dev mailing list