<div dir="ltr"><div><div>Hi,<br><br></div>Check out rtimer <a href="http://kamailio.org/docs/modules/4.1.x/modules/rtimer.html">http://kamailio.org/docs/modules/4.1.x/modules/rtimer.html</a><br><br></div>/Morten<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jul 2, 2014 at 6:59 PM, AliReza Khoshgoftar Monfared <span dir="ltr"><<a href="mailto:khoshgoftar@gmail.com" target="_blank">khoshgoftar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Thanks very much.<br><br></div>That is the correct answer.<br></div>just for the record, one can loadmodule "exec" and then use something like:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">


exec_avp("netstat -ul | grep ':sip' | awk '{print $$2}'","$avp(s:test)");<br></blockquote><br></div>the value of the recv-q is then stored in $avp(s:test) and can be used anywhere<br><div>


<br></div><div>Just a side question. I can call "exec_avp" inside my route{} block obviously. I understand that route{} block is entered anytime that there is a message for processing (correct me if wrong), but if, say, I want to check the value of recv-q every 100ms, where in the config script shall I call it and how shall I specify the calling frequency?<br>


<br></div><div>Thanks,<br>Alireza<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 2, 2014 at 6:57 AM, Morten Isaksen <span dir="ltr"><<a href="mailto:misak@misak.dk" target="_blank">misak@misak.dk</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>You can use netstat and look at the Recv-Q counter. This should indicate the packets that is waiting for kamailio to process.<br>


<br></div>/Morten<br></div><div class="gmail_extra"><div><div>
<br><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 1:12 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    the SIP messages send on UDP/SCTP are received directly from the
    buffer in kernel one by one, each being processed once read. It is
    hard to know how many are waiting in the kernel.<br>
    <br>
    My question would be, when such information would really help? If
    kamailio is too busy handling traffic, won't get much time to care
    of other tasks (e.g., predict what is in network read kernel queue).<br>
    <br>
    Cheers,<br>
    Daniel<div><div><br>
    <br>
    <div>On 30/06/14 16:40, AliReza Khoshgoftar
      Monfared wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr">
        <div>
          <div>Hi,<br>
            <br>
          </div>
          I had another simple question:<br>
          <br>
        </div>
        <div>In a kamailio server (proxy), how do I check the number of
          messages currently waiting for processing?<br>
          <br>
          <br>
        </div>
        <div>Is there a variable that I can monitor, say, if I want to
          make a routing decision in my config based on the number of
          messages in the queue?<br>
          <br>
        </div>
        <div>Also, is it possible to get a head count by method? or is
          it only possible after fully parsing the message?<br>
          <br>
        </div>
        <div>I see that "ratelimit" module uses similar information, but
          I am not sure how to get the status of these queues that the
          module uses.<br>
          <br>
        </div>
        <div>Thanks<br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre><span><font color="#888888">
    </font></span></blockquote><span><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
  </font></span></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br></div></div><span><font color="#888888">Morten Isaksen<br>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Morten Isaksen<br>
</div>