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

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 26 16:28:22 CET 2009



On 03/26/2009 05:18 PM, Ovidiu Sas wrote:
>> even now the statistics API is in core (no bind of other modules required).
>> But implementations belong to modules. It is what we did wit
>> pseudo-varibles, te API is in core the implementation is in modules,
>> however, you can get access to all PVs as you wish from any module you want.
>>     
>
> If we do the same thing for statistics (API in the core) I have
> nothing against moving the stats code into a generic module.
>
>   
there is such support:

- stat_var* get_stat( str *name );
- unsigned int get_stat_val( stat_var *var );

First is to get the pointer to statistic structure and second to get its 
value. Does not matter is a function-based statistic or simple counter. 
The PV module exports $stat(name) and one can access statistics exported 
by core, tm or other module.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
SIP Router Masterclass - Kamailio (OpenSER) Training
http://www.asipto.com/index.php/sip-router-masterclass/




More information about the Devel mailing list