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

Ovidiu Sas osas at voipembedded.com
Wed Mar 25 23:35:26 CET 2009


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.


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
>>
>>
>> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Devel mailing list
>> Devel at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
>



More information about the Devel mailing list