[Kamailio-Devel] SF.net SVN: openser:[5764] trunk

Ovidiu Sas osas at voipembedded.com
Thu Mar 26 10:36:34 CET 2009


Hello Daniel,

On Thu, Mar 26, 2009 at 4:57 AM, Daniel-Constantin Mierla
<miconda at gmail.com> wrote:
> Hello Ovidiu,
>
> On 03/26/2009 12:35 AM, Ovidiu Sas wrote:
>>
>> Hello Jan,
>>
>> Those functions are exporting statistics related to the socket (the
>> number of bytes in the socket queue).
>> The ratelimit module has a new algorithm which relies on the number of
>> bytes in a socket queue.
>> If the number of bytes waiting in the queue is reaching the limit, the
>> server can reject incoming requests.
>> More info here:
>> http://openser.svn.sourceforge.net/openser/?rev=5765&view=rev
>>
>> The code was simply moved from the snmpstats module into the socket files.
>> Statistics belonging to the sockets should not belong to a particular
>> module, as other modules may need to use it (in my case: ratelimit).
>> That was the reason for moving the particular piece of code into the
>> core socket file.
>>
>> Is there a specific place to compute statistics in sr core?.  If yes,
>> we should move the code there and expose it to all the modules that
>> are requesting it.
>>
>
> I think this code belongs better to the statistics module for now in
> Kamailio and maybe moved later to a library in sr. The general idea, even
> with Kamailio, was to move the specific code out of the core. There is lot
> of undergoing work to integrate K with sip-router core, let's discuss any
> addition to the core in a while. There are very few left modules to be
> integrated, therefore should not take that long.
>
> I am thinking in creating a new module where to add cfg extensions in
> Kamailio core which are not used often. Not sure what name to give here...

For now, we can move the code into kcore library and later on into a
specific library.
I don't think it's good idea to move the code into the statistics
module.  The statistics module is just a framework for user defined
statistics.  Moving the code there, will create additional
dependencies for snmpstats and ratelimit modules.  The reason for
moving the code out of the snmpstats module was to avoid new module
inter-dependencies.

Regards,
Ovidiu Sas


> Cheers,
> Daniel
>
>>
>> Regards,
>> Ovidiu Sas
>>
>> On Wed, Mar 25, 2009 at 6:18 PM, Jan Janak <jan at ryngle.com> wrote:
>>
>>>
>>> What is the purpose of this change? I am asking because it breaks
>>> snmpstats in
>>> the kamailio-3.0 repository again.
>>>
>>> It seems to add two public functions, get_socket_list_from_proto and
>>> get_total_bytes_waiting. The 2nd function also seems to introduce extra
>>> static
>>> functions like parse_proc_net_line, get_used_waiting_queue, and
>>> match_ip_and_port.
>>>
>>> Do you believe that this belongs to the core, and especially in
>>> socket_info.c?
>>>
>>> Note also that parse_proc_net_line and get_used_waiting_queu rely on
>>> parsing
>>> files in /proc/net. These functions are not portable, most likely they
>>> will
>>> not work on non-linux based systems.
>>>
>>>  Jan.
>>>
>>> On 24-03 22:54, Ovidiu Sas wrote:
>>>
>>>>
>>>> Revision: 5764
>>>>          http://openser.svn.sourceforge.net/openser/?rev=5764&view=rev
>>>> Author:   osas
>>>> Date:     2009-03-24 22:54:33 +0000 (Tue, 24 Mar 2009)
>>>>
>>>> Log Message:
>>>> -----------
>>>> Moving socket related code from snmpstats module into the core:
>>>>  - other modules will be able to access socket related statistics
>>>> directly from core
>>>>
>>>> Modified Paths:
>>>> --------------
>>>>    trunk/modules/snmpstats/alarm_checks.c
>>>>    trunk/modules/snmpstats/openserObjects.c
>>>>    trunk/modules/snmpstats/openserSIPPortTable.c
>>>>    trunk/modules/snmpstats/snmpstats_globals.h
>>>>    trunk/socket_info.c
>>>>    trunk/socket_info.h
>>>>
>>>> Removed Paths:
>>>> -------------
>>>>    trunk/modules/snmpstats/network_stats.c
>>>>    trunk/modules/snmpstats/network_stats.h



More information about the Devel mailing list