[Asterisk-Users] asterisk showing more than once on ps

Armin Schindler armin at melware.de
Sun Jul 3 02:17:41 MST 2005


On Sat, 2 Jul 2005, Michael Stahl wrote:
> The system startup script /etc/init.d/asterisk calls the script
> /usr/sbin/safe_asterisk
> 
> In safe_asterisk, the program is started with -c by default (console on
> TTY9).
> 
> That explains why it is starting with a console, but not why it's
> running so many times!  Here is what my system (FC3) shows:
> 
> [root at pbx sbin]# ps ax | grep asterisk
>  3371 ?        S      0:00 /bin/sh /usr/sbin/safe_asterisk
>  3417 ?        S      0:00 asterisk -vvvg -c
>  6846 ?        S      0:00 asterisk -vvvg -c
>  6848 ?        S      0:00 asterisk -vvvg -c
>  6849 ?        S      0:00 asterisk -vvvg -c
>  6850 ?        S      0:00 asterisk -vvvg -c
>  6853 ?        S      0:01 asterisk -vvvg -c
>  6854 ?        S      0:00 asterisk -vvvg -c
>  8479 pts/1    S+     0:00 grep asterisk
> 
> 
> Can anyone explain why asterisk is being launched 7 times?

It isn't launched 7 times. Asterisk is a multi-threaded application and 
depending on what modules are active, a new thread will be created. That's 
what you see.
The line 'asterisk -vvvg -c' doesn't mean that every thread has it's own
'c'onsole. Just one thread is the console.
So this is absolutly normal.
When, on some systems, do just see one thread/program, then this system just 
show the main-thread. This depends on kernel/ps version.

Armin




More information about the asterisk-users mailing list