Hi, Check out rtimer http://kamailio.org/docs/modules/4.1.x/modules/rtimer.html
/Morten On Wed, Jul 2, 2014 at 6:59 PM, AliReza Khoshgoftar Monfared < khoshgof...@gmail.com> wrote: > Thanks very much. > > That is the correct answer. > just for the record, one can loadmodule "exec" and then use something like: > > exec_avp("netstat -ul | grep ':sip' | awk '{print $$2}'","$avp(s:test)"); >> > > the value of the recv-q is then stored in $avp(s:test) and can be used > anywhere > > 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? > > Thanks, > Alireza > > > On Wed, Jul 2, 2014 at 6:57 AM, Morten Isaksen <mi...@misak.dk> wrote: > >> Hi, >> >> You can use netstat and look at the Recv-Q counter. This should indicate >> the packets that is waiting for kamailio to process. >> >> /Morten >> >> >> On Tue, Jul 1, 2014 at 1:12 PM, Daniel-Constantin Mierla < >> mico...@gmail.com> wrote: >> >>> Hello, >>> >>> 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. >>> >>> 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). >>> >>> Cheers, >>> Daniel >>> >>> >>> On 30/06/14 16:40, AliReza Khoshgoftar Monfared wrote: >>> >>> Hi, >>> >>> I had another simple question: >>> >>> In a kamailio server (proxy), how do I check the number of messages >>> currently waiting for processing? >>> >>> >>> 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? >>> >>> Also, is it possible to get a head count by method? or is it only >>> possible after fully parsing the message? >>> >>> 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. >>> >>> Thanks >>> >>> >>> _______________________________________________ >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing >>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>> >>> >>> -- >>> Daniel-Constantin Mierla - >>> http://www.asipto.comhttp://twitter.com/#!/miconda - >>> http://www.linkedin.com/in/miconda >>> >>> >>> _______________________________________________ >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>> sr-users@lists.sip-router.org >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>> >>> >> >> >> -- >> Morten Isaksen >> >> _______________________________________________ >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >> sr-users@lists.sip-router.org >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >> >> > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > > -- Morten Isaksen
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users