[Asterisk-Users] Re: multiple instances of asterisk spawning (summary)

Steven Kokinos steve at kokinos.com
Wed Apr 28 08:10:56 MST 2004


Thanks for everyone who replied. I thought I would summarize the 
responses for the archive, in case anyone else is searching on this in 
the future (and doesn't know what to look for in the dev lists).

In short:

On Fedora Core 1 (or later) using standard redhat supplied kernels, as 
well as for people who are running v2.6 of the kernel, you will only 
see one instance of asterisk when running the ps command.

[root at phl-01 root]# ps -aux | grep asterisk
root       747  0.0  0.2  6044 1124 ?        S    09:15   0:00 /bin/sh 
/usr/sbin/safe_asterisk
root       749  0.1  1.0 183124 5440 ?       S    09:15   0:07 asterisk 
-vvvg -c

This will be the case for all multi-threaded apps (apache, etc.). If 
you would like to see the individual threads, add the -m option to 
whatever flags you are using with the ps command, and the individual 
threads will be shown.

If you are using a stock 2.4 kernel (i.e. - without the NPTL back port) 
then you will see all of the asterisk threads. Both are correct, and 
this is completely independent of asterisk (which would be running fine 
in either case).

-Steve

On Apr 27, 2004, at 5:42 PM, Tony Mountifield wrote:

> In article <D6CC23E9-9886-11D8-A197-000393B0A472 at kokinos.com>,
> Steven Kokinos <steve at kokinos.com> wrote:
>> On Apr 27, 2004, at 2:22 PM, Steven Critchfield wrote:
>>
>>> Link to google... http://tinyurl.com/38fdu
>>> Look closely at the search terms that will show up when you get 
>>> there.
>>> When I search with those terms, I see over half of the first page 
>>> with
>>> subjects pertaining to thread safe and reentrant functions. This 
>>> should
>>> be the flaming blue clue hammer that lights the way.
>>
>> Fair enough. Since it hadn't appeared to be multi-threaded in the past
>> I was thinking more along the lines of runaway process than anything
>> else. Point taken.
>
> On a system where Asterisk does not "appear" to be multi-threaded, you
> may well find that adding -m to the ps command shows the other threads.
>
> Perhaps the difference is down to whether the kernel has NPTL (Native
> Posix Thread Library?) or not. The stock Fedora kernels do.
>
> Cheers,
> Tony
> -- 
> Tony Mountifield
> Work: tony at softins.co.uk - http://www.softins.co.uk
> Play: tony at mountifield.org - http://tony.mountifield.org
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>




More information about the asterisk-users mailing list