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

Richard Koch n1gp at hotmail.com
Wed Jul 6 12:44:57 MST 2005


>>
>>[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

But that doesn't explain why, on the same machine, if you call 
"/etc/init.d/asterisk stop"
and then "/etc/init.d/asterisk start", you dont many processes, just one. 
Shouldn't this
be consistent with your explanation?

Rick





More information about the asterisk-users mailing list