[asterisk-users] safe_asterisks pawning multiple asterisk process???

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Nov 16 05:11:23 MST 2006


On Thu, Nov 16, 2006 at 01:36:50AM +0530, Vicky wrote:
> its normal .if there are many calls going . You should worry if your load or
> memory usage is very high .
> 
> On 16/11/06, Andre Courchesne - Consultant <courchea at net-forces.com> wrote:
> >
> >We have 1 server that after a few hours operating has multiple process
> >of asterisk running. Here is the pstree output:
> >
> ># pstree
> >init-+-atftpd
> >     |-auditd---{auditd}
> >     |-bash---safe_opserver---op_server.pl
> >     |-crond
> >     |-cwASTcall.pl
> >     |-dbus-daemon
> >     |-events/0
> >     |-hald-+-hald-addon-acpi
> >     |      `-2*[hald-addon-stor]
> >     |-httpd---3*[httpd]
> >     |-khelper
> >     |-klogd
> >     |-ksoftirqd/0
> >     |-kswapd0
> >     |-kthread-+-aio/0
> >     |         |-ata/0
> >     |         |-hda_codec/0
> >     |         |-kacpid
> >     |         |-kauditd
> >     |         |-kblockd/0
> >     |         |-khubd
> >     |         |-kseriod
> >     |         |-2*[pdflush]
> >     |         |-reiserfs/0
> >     |         |-rpciod/0
> >     |         |-scsi_eh_0
> >     |         |-scsi_eh_1
> >     |         `-scsi_eh_2
> >     |-2*[mingetty]
> >     |-mysqld_safe---mysqld---16*[{mysqld}]
> >     |-ntpd
> >     |-safe_asterisk---asterisk-+-45*[asterisk]
> >     |                          `-22*[{asterisk}]
> >     |-sshd---sshd---bash---pstree
> >     |-syslogd
> >     |-udevd
> >     |-usb-storage
> >     `-wan_ecd---wan_ecd
> >
> >And "ps aux | grep asterisk":
> >
> ># ps aux | grep asterisk
> >asterisk  2047  0.0  0.1   9200  1516 ?        S    Nov14   0:00 /usr/sbin/httpd
> >asterisk  2084  0.0  0.2  11544  2388 ?        S    Nov14   0:00 /usr/sbin/httpd
> >asterisk  2085  0.0  0.2  11544  2384 ?        S    Nov14   0:00 /usr/sbin/httpd

Apache. Run under the user Asterisk.

> >root      2196  0.0  0.0   2172   456 ?        S    Nov14   0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk

Master safe_asterisk process.

> >asterisk  2215  1.6 10.0 122496 90984 ?        Sl   Nov14  38:07 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c

Asterisk itself.

> >asterisk  2250  0.0  0.0   2176   376 ?        S    Nov14   0:00 -bash -c cd /var/www/AMP/panel && /var/www/AMP/panel/safe_opserver &

A "safe" version for the flash operator server. Why bother with that is 
beyond me. That daemon is not a critical component. Adding an extra
looper just adds complexity. But then again, trixbox is just added
complexity.

> >asterisk  2251  0.0  0.0   2128   868 ?        S    Nov14   0:00 /bin/bash /var/www/AMP/panel/safe_opserver

Non-daemonizing op-panel wrapper"? Someone got the daemonizinf code
wrong?

> >asterisk  2253  3.2  0.8   8988  7336 ?        R    Nov14  73:54 /usr/bin/perl -w ./op_server.pl

The op-panel daemon itself.

> >asterisk 12105  0.0  0.8  31440  7804 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 13080  0.0  0.8  32096  7616 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 18352  0.0  0.9  36080  8684 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 19352  0.0  0.9  36528  8764 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 25402  0.0  0.9  39196  8972 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 26497  0.0  1.0  40448  9372 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 30901  0.0  1.0  42064  9308 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  3160  0.0  0.6  43968  5624 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 12444  0.0  0.5  49636  5148 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 22538  0.0  0.5  54532  5148 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 26032  0.0  0.5  56948  5148 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 27517  0.0  0.5  57056  5148 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 31806  0.0  1.0  58956  9800 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  3655  0.0  1.0  60088  9932 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  4636  0.0  1.1  60956 10316 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  7494  0.0  1.2  62200 10952 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  9276  0.0  1.3  64856 12040 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 11592  0.0  1.4  65404 12720 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 12757  0.0  1.4  66808 13504 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 13167  0.0  1.4  66576 13296 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 13363  0.0  1.4  65936 13156 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 16251  0.0  1.6  68812 14664 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 16942  0.0  1.6  68600 14676 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 24818  0.0  1.6  72740 15308 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 29714  0.0  1.7  75332 15824 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  5114  0.0  1.6  78932 15144 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  5716  0.0  1.7  78560 15408 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  9605  0.0  1.7  81680 16228 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 10235  0.0  1.8  81020 16864 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 17429  0.0  1.9  84996 17896 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 18090  0.0  2.0  85480 18176 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 20542  0.0  2.0  86980 18732 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 24370  0.0  4.0  88652 36340 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 30247  0.0  6.0  92268 54432 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 30904  0.0  6.1  92492 55920 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 31363  0.0  6.2  92500 56396 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk   855  0.0  6.4  93668 58120 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  1983  0.0  6.5  94380 58944 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  8973  0.0  6.8  97764 61560 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk  9486  0.0  6.9  98020 62948 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 10415  0.0  6.9  99956 63320 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 13766  0.0  7.2 100848 65676 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 14013  0.0  7.3 101248 66128 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 16687  0.0  7.4 102364 67736 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c
> >asterisk 17857  0.0  7.4 102092 67824 ?        S    Nov14   0:00 /usr/sbin/asterisk -U asterisk -G asterisk -vvvg -c

Asterisk again. As you can clearly see from the memory size, this is not
the same process as above. From its size it seems to be rather idle.

Shouldn't they die?

> >asterisk 13681  0.0  0.0   2176   360 ?        S    14:11   0:00 /bin/sh -c ( /usr/sbin/sendmail -t < /tmp/astmail-xboGM2 ; rm -f
> >/tmp/astmail-xboGM2 ) &

Asterisk sending a message. Harmless if temporary.

> >root     13685  0.0  0.0   1820   584 pts/1    R+   14:11   0:00 grep --color=auto asterisk

Your grep command from the pipeline.


-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list