Re: [asterisk-users] Reducing number of Asterisk processes?
On Saturday 29 January 2011 04:52:02 Gilles wrote: Hello On a uClinux-based appliance, ps aux shows multiple Asterisk processes: 380 root 11990 S asterisk -f 381 root 11990 S asterisk -f 383 root 11990 S asterisk -f 384 root 11990 S asterisk -f 385 root 11990 S asterisk -f 386 root 11990 S asterisk -f 387 root 11990 S asterisk -f 388 root 11990 S asterisk -f 389 root 11990 S asterisk -f 390 root 11990 S asterisk -f 391 root 11990 S asterisk -f 392 root 11990 S asterisk -f 393 root 11990 S asterisk -f 394 root 11990 S asterisk -f 395 root 11990 S asterisk -f 396 root 11990 S asterisk -f 397 root 11990 S asterisk -f 398 root 11990 S asterisk -f 399 root 11990 S asterisk -f 400 root 11990 S asterisk -f 401 root 11990 S asterisk -f I was wondering... 1. Why have more than one? 2. Provided each process is indeed using 11.990 bytes, is it possible to reduce the number of concurrent processes, considering the fact that this appliance will not handle more than a couple of concurrent calls? 1. uClinux has no fork(2) call, only a vfork(2) call. Therefore, these amount to multiple processes sharing the same address space. In fact, it's very likely that these are multiple threads, not processes at all. 2. The unit is in kilobytes. These processes take up 12 MB, not 12KB. 3. Your questions are probably more appropriate to the uClinux mailing lists. They should, at the very least, be able to more completely answer your queries about the behavior of non-Asterisk system utilities. -- Tilghman -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
On Sunday 30 January 2011 02:28:29 Tilghman Lesher wrote: On Saturday 29 January 2011 04:52:02 Gilles wrote: 2. Provided each process is indeed using 11.990 bytes, is it possible to reduce the number of concurrent processes, considering the fact that this appliance will not handle more than a couple of concurrent calls? 1. uClinux has no fork(2) call, only a vfork(2) call. Therefore, these amount to multiple processes sharing the same address space. In fact, it's very likely that these are multiple threads, not processes at all. 2. The unit is in kilobytes. These processes take up 12 MB, not 12KB. 3. Your questions are probably more appropriate to the uClinux mailing lists. They should, at the very least, be able to more completely answer your queries about the behavior of non-Asterisk system utilities. By the way, you are likely to have trouble running Asterisk on uClinux, anyway. There are a lot of assumptions in the code related to fork(2) creating a separate address space. As this is not true with vfork(2), there are parts of Asterisk that will mysteriously fail. Unless you are comfortable delving into the C code and working on these issues, uClinux will probably never be an appropriate system for you with which to run Asterisk. -- Tilghman -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
On Sun, 30 Jan 2011, Tilghman Lesher wrote: By the way, you are likely to have trouble running Asterisk on uClinux, anyway. There are a lot of assumptions in the code related to fork(2) creating a separate address space. As this is not true with vfork(2), there are parts of Asterisk that will mysteriously fail. Unless you are comfortable delving into the C code and working on these issues, uClinux will probably never be an appropriate system for you with which to run Asterisk. I understand the Atcom range of commercial Asterisk products all run under uClinux... E.G. http://www.atcom.cn/IP01.html and the others in their range. I was assuming this was that the OP had and what he was refering to... Gordon -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
On Sun, 30 Jan 2011 02:28:29 -0600, Tilghman Lesher tilgh...@meg.abyt.es wrote: 1. uClinux has no fork(2) call, only a vfork(2) call. Therefore, these amount to multiple processes sharing the same address space. In fact, it's very likely that these are multiple threads, not processes at all. 2. The unit is in kilobytes. These processes take up 12 MB, not 12KB. Thanks for the info. The appliance only has 64MB, and with all those threads running along with OpenVPN, SSHd, and DHCPd, there are still about 30MB free, so I guess those items in ps aren't really using that much memory: root:/etc/asterisk ps aux PID UidVSZ Stat Command ... 527 root 12022 S asterisk -f 528 root 12022 S asterisk -f 530 root 12022 S asterisk -f 531 root 12022 S asterisk -f 532 root 12022 S asterisk -f 533 root 12022 S asterisk -f 534 root 12022 S asterisk -f 535 root 12022 S asterisk -f 536 root 12022 S asterisk -f 537 root 12022 S asterisk -f 538 root 12022 S asterisk -f 539 root 12022 S asterisk -f 540 root 12022 S asterisk -f 541 root 12022 S asterisk -f 542 root 12022 S asterisk -f 543 root 12022 S asterisk -f 544 root 12022 S asterisk -f 545 root 12022 S asterisk -f 546 root 12022 S asterisk -f 547 root 12022 S asterisk -f 548 root 12022 S asterisk -f -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
On Sun, 30 Jan 2011 12:11:30 -0600, Tilghman Lesher tilgh...@meg.abyt.es wrote: By the way, you are likely to have trouble running Asterisk on uClinux, anyway. There are a lot of assumptions in the code related to fork(2) creating a separate address space. As this is not true with vfork(2), there are parts of Asterisk that will mysteriously fail. Unless you are comfortable delving into the C code and working on these issues, uClinux will probably never be an appropriate system for you with which to run Asterisk. Apparently, that version of Asterisk originally comes from the OpenWrt world, and includes a bunch of patches applied to the Asterisk source code before compiling it into a package. Since it's part of the official firmware provided by the manufacturer, I guess it's been reworked to run OK in that restricted environment. I do, intend, though, to find some kind of watchdog to monitor processes and memory, and restart them if necessary. Thanks for pointing this out. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
check your /etc/asterisk/asterisk.conf and post it here best On Sat, Jan 29, 2011 at 2:22 PM, Gilles codecompl...@free.fr wrote: Hello On a uClinux-based appliance, ps aux shows multiple Asterisk processes: 380 root 11990 S asterisk -f 381 root 11990 S asterisk -f 383 root 11990 S asterisk -f 384 root 11990 S asterisk -f 385 root 11990 S asterisk -f 386 root 11990 S asterisk -f 387 root 11990 S asterisk -f 388 root 11990 S asterisk -f 389 root 11990 S asterisk -f 390 root 11990 S asterisk -f 391 root 11990 S asterisk -f 392 root 11990 S asterisk -f 393 root 11990 S asterisk -f 394 root 11990 S asterisk -f 395 root 11990 S asterisk -f 396 root 11990 S asterisk -f 397 root 11990 S asterisk -f 398 root 11990 S asterisk -f 399 root 11990 S asterisk -f 400 root 11990 S asterisk -f 401 root 11990 S asterisk -f I was wondering... 1. Why have more than one? 2. Provided each process is indeed using 11.990 bytes, is it possible to reduce the number of concurrent processes, considering the fact that this appliance will not handle more than a couple of concurrent calls? Thank you. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
On Sat, 29 Jan 2011 15:47:53 +0330, Pezhman Lali l...@lopl.net wrote: check your /etc/asterisk/asterisk.conf and post it here Here goes: root:/var/tmp cat /etc/asterisk/asterisk.conf [directories] astetcdir = /etc/asterisk astmoddir = /usr/lib/asterisk/modules astvarlibdir = /var/lib/asterisk astagidir = /usr/share/asterisk/agi-bin astspooldir = /var/spool/asterisk astlogdir = /var/log/asterisk Thank you. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
Dear it's the default setting of asterisk.conf, your config is not complete. -f in the ps output, shows your asterisk have been run in fork mode, disable it. [directories](!) ; remove the (!) to enable this astetcdir = /etc/asterisk astmoddir = /usr/lib/asterisk/modules astvarlibdir = /var/lib/asterisk astdbdir = /var/lib/asterisk astkeydir = /var/lib/asterisk astdatadir = /var/lib/asterisk astagidir = /var/lib/asterisk/agi-bin astspooldir = /var/spool/asterisk astrundir = /var/run/asterisk astlogdir = /var/log/asterisk [options] ;verbose = 3 ;debug = 3 ;alwaysfork = yes ; same as -F at startup ;nofork = yes ; same as -f at startup ;quiet = yes ; same as -q at startup ;timestamp = yes ; same as -T at startup ;execincludes = yes ; support #exec in config files ;console = yes ; Run as console (same as -c at startup) ;highpriority = yes ; Run realtime priority (same as -p at startup) ;initcrypto = yes ; Initialize crypto keys (same as -i at startup) ;nocolor = yes ; Disable console colors ;dontwarn = yes ; Disable some warnings ;dumpcore = yes ; Dump core on crash (same as -g at startup) ;languageprefix = yes ; Use the new sound prefix path syntax ;internal_timing = yes ;systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues ;autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure, or systemname if set ;maxcalls = 10 ; Maximum amount of calls allowed ;maxload = 0.9 ; Asterisk stops accepting new calls if the load average exceed this limit ;maxfiles = 1000 ; Maximum amount of openfiles ;minmemfree = 1 ; in MBs, Asterisk stops accepting new calls if the amount of free memory falls below this watermark ;cache_record_files = yes ; Cache recorded sound files to another directory during recording ;record_cache_dir = /tmp ; Specify cache directory (used in conjunction with cache_record_files) ;transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded ;transmit_silence = yes ; Transmit silence while a channel is in a waiting state, a recording only state, or when DTMF is ; being generated. Note that the silence internally is generated in raw signed linear format. ; This means that it must be transcoded into the native format of the channel before it can be sent ; to the device. It is for this reason that this is optional, as it may result in requiring a ; temporary codec translation path for a channel that may not otherwise require one. ;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly ;sendfullybooted = yes ; Send the FullyBooted AMI event on AMI login and when all modules are finished loading ;runuser = asterisk ; The user to run as ;rungroup = asterisk ; The group to run as ;lightbackground = yes ; If your terminal is set for a light-colored background documentation_language = en_US ; Set the Language you want Documentation displayed in. Value is in the same format as locale names ;hideconnect = yes ; Hide messages displayed when a remote console connects and disconnects ; Changing the following lines may compromise your security. ;[files] ;astctlpermissions = 0660 ;astctlowner = root ;astctlgroup = apache ;astctl = asterisk.ctl [compat] pbx_realtime=1.6 res_agi=1.6 app_set=1.6 On Sat, Jan 29, 2011 at 4:32 PM, Gilles codecompl...@free.fr wrote: On Sat, 29 Jan 2011 15:47:53 +0330, Pezhman Lali l...@lopl.net wrote: check your /etc/asterisk/asterisk.conf and post it here Here goes: root:/var/tmp cat /etc/asterisk/asterisk.conf [directories] astetcdir = /etc/asterisk astmoddir = /usr/lib/asterisk/modules astvarlibdir = /var/lib/asterisk astagidir = /usr/share/asterisk/agi-bin astspooldir = /var/spool/asterisk astlogdir = /var/log/asterisk Thank you. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
On Sat, 29 Jan 2011 19:11:35 +0330, Pezhman Lali l...@lopl.net wrote: it's the default setting of asterisk.conf, your config is not complete. -f in the ps output, shows your asterisk have been run in fork mode, disable it. Thanks for the tip. I looked around in /etc/asterisk, but found no info about the number of child processes being forked, and /etc/init.d/asterisk doesn't do much either: case $1 in start) export TZ=`cat /etc/TZ`; asterisk -f /dev/null 2/dev/null ;; -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Gilles Sent: Saturday, January 29, 2011 11:20 AM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] Reducing number of Asterisk processes? On Sat, 29 Jan 2011 19:11:35 +0330, Pezhman Lali l...@lopl.net wrote: it's the default setting of asterisk.conf, your config is not complete. -f in the ps output, shows your asterisk have been run in fork mode, disable it. Thanks for the tip. I looked around in /etc/asterisk, but found no info about the number of child processes being forked, and /etc/init.d/asterisk doesn't do much either: case $1 in start) export TZ=`cat /etc/TZ`; asterisk -f /dev/null 2/dev/null ;; -- My asterisk runs with the -f option. ps aux | grep ast root 5475 0.0 0.0 61256 748 pts/0S+ 11:28 0:00 grep ast root 25937 0.0 0.0 65956 616 pts/1SJan27 0:00 /bin/sh /usr/sbin/safe_asterisk root 25942 0.6 0.1 566248 25676 pts/1Sl Jan27 15:39 /usr/sbin/asterisk -f -vvvg -c -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Reducing number of Asterisk processes?
On Sat, 29 Jan 2011 11:29:02 -0500, William Stillwell will...@stillwellsoft.com wrote: My asterisk runs with the -f option. ps aux | grep ast root 5475 0.0 0.0 61256 748 pts/0S+ 11:28 0:00 grep ast root 25937 0.0 0.0 65956 616 pts/1SJan27 0:00 /bin/sh /usr/sbin/safe_asterisk root 25942 0.6 0.1 566248 25676 pts/1Sl Jan27 15:39 /usr/sbin/asterisk -f -vvvg -c The appliance runs Asterisk directly, not through the safe_asterisk script, and I can't find where the number of processes is set :-/ -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users