<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    when you run just 'kamailio', the first executable found in path is
    executed (this is returned by command 'which kamailio'). When you
    execute with absolute path /etc/init.d/kamailio, then that specific
    file is executed.<br>
    <br>
    'which kamailio' returns very likely the kamailio binary
    (/usr/local/sbin/kamailio if you installed from sources), which is
    the pure kamailio with no command line parameters.<br>
    <br>
    The /etc/init.d/kamailio is a script, wrapper around the pure
    kamailio binary, giving to it some command line parameters.<br>
    <br>
    If you do 'ps auxw | grep kamailio' you should see the difference of
    running command.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    On 2/5/12 9:26 AM, Uri Shacked wrote:
    <blockquote
cite="mid:CAMMbDhS_2ovOxFD8-edf1rXYx-PneUKDAEqyaOR-ODbp2duf=g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div>&nbsp;</div>
        <div>any help will be graet....</div>
        <div>&nbsp;</div>
        <div>&nbsp;</div>
        <div><em>&nbsp;hi,<br>
          </em>&gt;<i><br>
          </i>&gt;<i> when i moved the /etc/init.d/kamailio file.
            kamailio did not start at boot.<br>
          </i>&gt;<i> now, i set the debug level to 4 and run kamailio
            in both ways.<br>
          </i>&gt;<i><br>
          </i>&gt;<i> 1. "/etc/init.d/kamailio start"<br>
          </i>&gt;<i><br>
          </i>&nbsp; the resault was :<br>
          <br>
          *Feb&nbsp; 1 19:59:04 net-ivr-KamIN-J1 kamailio: DEBUG:
          &lt;core&gt;<br>
          [mem/q_malloc.c:202]: qm_malloc_init: QM_OPTIMIZE=16384,
          /ROUNDTO=2048<br>
          Feb&nbsp; 1 19:59:04 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/q_malloc.c:204]: qm_malloc_init: QM_HASH_SIZE=2099,
          qm_block<br>
          size=218344<br>
          Feb&nbsp; 1 19:59:04 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/q_malloc.c:205]: qm_malloc_init(0x7f1cf585b000,
          2147483648),<br>
          start=0x7f1cf585b000<br>
          Feb&nbsp; 1 19:59:04 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/q_malloc.c:213]: qm_malloc_init: size= 2147483648,
          init_overhead=218440<br>
          Feb&nbsp; 1 19:59:04 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/shm_mem.c:203]: shm_mem_init: success*<br>
          <br>
          &gt;<i><br>
          </i>&gt;<i> you can see the shm_mem size is 2048Mb.<br>
          </i>&gt;<i><br>
          </i><br>
          2."kamailio"<br>
          the resault was :<br>
          <br>
          *Feb&nbsp; 1 19:56:50 net-ivr-KamIN-J1 kamailio: DEBUG:
          &lt;core&gt;<br>
          [mem/q_malloc.c:202]: qm_malloc_init: QM_OPTIMIZE=16384,
          /ROUNDTO=2048<br>
          Feb&nbsp; 1 19:56:50 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/q_malloc.c:204]: qm_malloc_init: QM_HASH_SIZE=2099,
          qm_block<br>
          size=218344<br>
          Feb&nbsp; 1 19:56:50 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/q_malloc.c:205]: qm_malloc_init(0x7f8618310000,
          33554432),<br>
          start=0x7f8618310000<br>
          Feb&nbsp; 1 19:56:50 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/q_malloc.c:213]: qm_malloc_init: size= 33554432,
          init_overhead=218440<br>
          Feb&nbsp; 1 19:56:50 net-ivr-KamIN-J1 kamailio: DEBUG: &lt;core&gt;<br>
          [mem/shm_mem.c:203]: shm_mem_init: success*<br>
          **<br>
          the resault is 32Mb.<br>
          <br>
          any ideas?<br>
          <br>
          <br>
          &gt;<i><br>
          </i>&gt;<i> On Wed, Feb 1, 2012 at 5:01 PM, Jason Penton &lt;<a
              moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">jason.penton
              at smilecoms.com</a>&gt;wrote:<br>
          </i>&gt;<i><br>
          </i>&gt;&gt;<i> I am not familiar with Centos but I suspect
            there is another script being<br>
          </i>&gt;&gt;<i> run from somewhere. What I would do is move
            the /etc/init.d/kamailio script<br>
          </i>&gt;&gt;<i> somewhere safe (your home directory for eg).
            Then reboot and see if<br>
          </i>&gt;&gt;<i> kamailio still starts - if it does you need to
            find out whihc script is<br>
          </i>&gt;&gt;<i> being called and where it is.<br>
          </i>&gt;&gt;<i><br>
          </i>&gt;&gt;<i> If you are not running X by default you are
            prob in runlevel 3. If you<br>
          </i>&gt;&gt;<i> are running X, then it will be 5. check where
            you runlevel scripts are<br>
          </i>&gt;&gt;<i> pointing. e.g.<br>
          </i>&gt;&gt;<i><br>
          </i>&gt;&gt;<i> ls -al /etc/rc3.d/SXXkamailio (X = [0-9])<br>
          </i>&gt;&gt;<i><br>
          </i>&gt;&gt;<i> Cheers<br>
          </i>&gt;&gt;<i> Jason<br>
          </i>&gt;&gt;<i><br>
          </i>&gt;&gt;<i>&nbsp; On Wed, Feb 1, 2012 at 4:26 PM, Uri Shacked
            &lt;<a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">uri.shacked
              at gmail.com</a>&gt;wrote:<br>
          </i>&gt;&gt;<i><br>
          </i>&gt;&gt;&gt;<i>&nbsp; Hi,<br>
          </i>&gt;&gt;&gt;<i><br>
          </i>&gt;&gt;&gt;<i> when i reboot the machine, it starts with
            32Mb and i do not understand<br>
          </i>&gt;&gt;&gt;<i> why...<br>
          </i>&gt;&gt;&gt;<i> so, does it use a startup file that i am
            not familiar with?<br>
          </i>&gt;&gt;&gt;<i> what is the appropriate runlevel? how do i
            set it and where?<br>
          </i>&gt;&gt;&gt;<i><br>
          </i>&gt;&gt;&gt;<i> thanks,<br>
          </i>&gt;&gt;&gt;<i> Uri<br>
          </i>&gt;&gt;&gt;<i><br>
          </i>&gt;&gt;&gt;<i><br>
          </i>&gt;&gt;&gt;<i> &gt;Hi Sammy,<br>
          </i>&gt;&gt;&gt;<i> &gt;<br>
          </i>&gt;&gt;&gt;<i> &gt;When you use the init script, it is
            starting Kamailio with the correct<br>
          </i>&gt;&gt;&gt;<i> &gt;arguments to get the environment you
            wish (-m 2048 probably). If<br>
          </i>&gt;&gt;&gt;<i> however,<br>
          </i>&gt;&gt;&gt;<i> &gt;you just call kamailio these args are
            not there. Im not sure why you are<br>
          </i>&gt;&gt;&gt;<i> &gt;running with kamailio command
            directly. Why don't you add your init<br>
          </i>&gt;&gt;&gt;<i> script<br>
          </i>&gt;&gt;&gt;<i> &gt;to the appropriate runlevel for auto
            startup?<br>
          </i>&gt;&gt;&gt;<i> &gt;<br>
          </i>&gt;&gt;&gt;<i> &gt;Cheers<br>
          </i>&gt;&gt;&gt;<i> &gt;Jason<br>
          </i>&gt;&gt;&gt;<i><br>
          </i>&gt;&gt;&gt;<i> On Wed, Feb 1, 2012 at 3:06 PM, Uri
            Shacked &lt;ushacked at <a moz-do-not-send="true"
              href="http://gmail.com">gmail.com</a>&lt;<a
              moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> wrote:<br>
          </i>&gt;&gt;&gt;<i><br>
          </i>&gt;&gt;&gt;<i> &gt;* Hi again....<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;* i installed kamailio 3.2.2 today.<br>
          </i>&gt;&gt;&gt;<i> *&gt;* i used the chkconfig tool to get
            kamailio run at boot.<br>
          </i>&gt;&gt;&gt;<i> *&gt;* i edited both /etc/init.d/kamailio
            and /etc/default/kamailio files<br>
          </i>&gt;&gt;&gt;<i> to run<br>
          </i>&gt;&gt;&gt;<i> *&gt;* with 2048Mg of memory.<br>
          </i>&gt;&gt;&gt;<i> *&gt;* now, when i run
            /etc/init.d/kamailio start, it starts with the right<br>
          </i>&gt;&gt;&gt;<i> *&gt;* amount of memory.<br>
          </i>&gt;&gt;&gt;<i> *&gt;* when i rum "kamailio" only, it
            starts with 32Mb....<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;*&nbsp; i use centos 6.2 64bit.<br>
          </i>&gt;&gt;&gt;<i> *&gt;* any ideas?<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;* On Tue, Oct 25, 2011 at 1:18 PM,
            Uri Shacked &lt;ushacked at <a moz-do-not-send="true"
              href="http://gmail.com">gmail.com</a>&lt;<a
              moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> wrote:<br>
          </i>&gt;&gt;&gt;<i> *&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* Hi.<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* I already checked it all. The
            kamailio start and stop command did<br>
          </i>&gt;&gt;&gt;<i> not<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* work. The init script i used
            was for debian. Now i use another<br>
          </i>&gt;&gt;&gt;<i> script,<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* for centos. It works. I add the
            kamailio proccess with chkconfig<br>
          </i>&gt;&gt;&gt;<i> tool.<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* Thanks.<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;*<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* On 10/25/11, Sammy Govind
            &lt;govoiper at <a moz-do-not-send="true"
              href="http://gmail.com">gmail.com</a>&lt;<a
              moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> wrote:<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; Thanks Alex,<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; Hey Uri, can you check if
            you've /etc/init.d/kamailio file<br>
          </i>&gt;&gt;&gt;<i> exists - open<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; that file if exists and
            cross verify few parameters.<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; Few of these are as
            follows<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;
            PATH=/sbin:/bin:/usr/sbin:/usr/bin<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;
            DAEMON=*/usr/local/sbin/kamailio*<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; NAME=kamailio<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; DESC=kamailio<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; HOMEDIR=/var/run/<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;
            *PIDFILE*=$HOMEDIR/$NAME.pid<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;
            DEFAULTS=*/etc/default/kamailio.default*<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;*&nbsp; &gt; RUN_KAMAILIO=yes<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; Make sure
            /etc/default/kamailio.default file exits. here are the<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* contents of<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; my file.<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; RUN_KAMAILIO=yes<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; USER=kamailio<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; GROUP=kamailio<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; MEMORY=64<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; DUMP_CORE=no<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; On Tue, Oct 25, 2011 at
            3:38 AM, Klaus Darilion &lt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt; klaus.mailinglists at <a
              moz-do-not-send="true" href="http://pernau.at">pernau.at</a>&lt;<a
              moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> wrote:<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; Test the startupscript
            if they work:<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; /etc/init.d/kamailio
            start<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; /etc/init.d/kamailio
            stop<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; If this works, then
            make sure to have proper symlinks from the<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; corresponding runlevel
            to the startup script. Do it manually or<br>
          </i>&gt;&gt;&gt;<i> use the<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; chkconfig tool.<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; klaus<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt; On 24.10.2011 08:00,
            Uri Shacked wrote:<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt; hi again,<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt; i found out that
            on my centos 5.4 the command<br>
          </i>&gt;&gt;&gt;<i> start-stop-daemon that<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* the<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;
            /etc/init.d/kamailio uses is not recognized.<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt; it is kamailio3.2
            any ideas?<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt; On Mon, Oct 24,
            2011 at 3:03 PM, Uri Shacked &lt;ushacked at<br>
          </i>&gt;&gt;&gt;<i> <a moz-do-not-send="true"
              href="http://gmail.com">gmail.com</a>&lt;<a
              moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt; &lt;mailto:<a
              moz-do-not-send="true" href="mailto:ushacked">ushacked</a>
            at <a moz-do-not-send="true" href="http://gmail.com">gmail.com</a>&lt;<a
              moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>&gt;&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> wrote:<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;&nbsp;&nbsp;&nbsp; Hi,<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;&nbsp;&nbsp;&nbsp; what is the
            best way to start kamailio at boot?<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;&nbsp;&nbsp;&nbsp; the example in
            the install is not working for me....<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *&gt;&gt;* &gt;&gt;&gt;<br>
          </i>&gt;&gt;&gt;<i> *<br>
          </i>&gt;&gt;&gt;<i><br>
          </i>&gt;&gt;<i><br>
          </i>&gt;&gt;<i> This email is subject to the disclaimer of
            Smile Communications (PTY) Ltd. at <a
              moz-do-not-send="true"
              href="http://www.smilecoms.com/disclaimer">http://www.smilecoms.com/disclaimer</a><br>
          </i>&gt;&gt;<i><br>
          </i>&gt;&gt;<i><br>
          </i>&gt;<i><br>
          </i></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>