[sr-dev] Kamailio stats vs counters

Olle E. Johansson oej at edvina.net
Fri Dec 26 23:08:59 CET 2014


Hi!

I have been digging a bit in statistics vs counters

Kamailio stats is a wrapper round the sr counters. 

They are interchangeable - all counters are listed as statistics and all statistics are listed as counters.

The counters have a bit more functions:

- COnfigurable prefixes
- Descriptions

If I list in-core module stats, some use counters and some use stats.

*** usrloc 
     location-contacts : 0   (kamailio statistic (no description)) 
     location-expires : 0   (kamailio statistic (no description)) 
     location-users : 0   (kamailio statistic (no description)) 
     registered_users : 0   (kamailio statistic (no description)) 

USRLOC use kamailio stats without descriptions

The core TCP stats use counters:

*** tcp 
     con_reset : 0   (total number of TCP_RSTs received on established connections.) 
     con_timeout : 0   (total number of connections that did timeout (idle for too long).) 
     connect_failed : 0   (number of failed active connection attempts.) 


The output is from kamcmd using a script I wrote.

I would like to convert as much as possible to counters with built-in descriptions. 
Would that create problems? Is there any missing functionality if I do that?

At this point it's a bit confusing with two modules using the same core functions,
so at some point we could make sure that the counters module have the same
functions and RPCs as statistics and merge them.

/O


More information about the sr-dev mailing list