Table of Contents
List of Examples
interval
parameteritems
parametertrack
parameterTable of Contents
This module provides a statistics collector engine. It can track the values of various internal Kamailio statistics for a specific period of time, allowing to retrieve them or a report over them via RPC commands.
The following modules must be loaded along this module:
various - (optional, e.g., sl, tm, usrloc) for getting access to the statistics exported by these modules.
Timer interval when to record the value for statistics.
Default value is 900 (15min).
How many items to store for each statistic.
Note: it must be set before any 'track' parameter.
Default value is 100.
Specify the statistics to track. The parameter can be set many times and one value can specify many statistics.
The format is "rname=sname", where the rname is the name for report and sname is internal Kamailio statistic name.
Next statistics are tracked by default:
shm.free - the internal statistic 'free_size' (from group 'shmem').
shm.used - the internal statistic 'used_size' (from group 'shmem').
shm.real_used - the internal statistic 'real_used_size' (from group 'shmem').
Default value is "".
Example 1.3. Set track
parameter
... modparam("statsc", "track", "req.received=rcv_requests") modparam("statsc", "track", "req.received=rcv_requests;rpl.received=rcv_replies") ...
Get the report of recorded statistics.
Name: statsc.report
Parameters:
_type_ :
“list”: list recorded values
“diff”: show diff between recorded values
_name_: (optional) name of the statistic to show the report for. If missing or set to 'all', then the reports for all recorded statistics are done.
_limit_: (optional) how many items to be included in the report
Example:
... # prototype: kamcmd statsc.report _type_ _name_ _limit_ kamcmd statsc.report list kamcmd statsc.report list all 10 kamcmd statsc.report diff ...