Documentation |
Documentation -> Manuals -> Manual 1.6 -> Statistics InterfacePages for other versions: devel 3.5 3.4 Older versions: 3.3 3.2 3.1 3.0 2.4 2.3 2.2 2.1 1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4
The Statistics Interface is an OpenSIPS interface that provides access to various internal statistics of OpenSIPS. The statistic provide useful information about what is going on inside OpenSIPS - this can be used by external applications, for monitoring purposes, load evaluation, realtime integration with other services. The values of statistic variables are exclusively numerical. OverviewOpenSIPS typically provides two types of statistic variables:
The statistic variables are not restart persistent, they all start with a 0 value (the counter like variables). The counter like statistics can also be reset (to 0 value) during OpenSIPS runtime. In OpenSIPS, the statistics variables are grouped in different sets, depending on their purposes or how is providing them. For example, the OpenSIPS core provides the shmem, load, net, etc groups, while each OpenSIPS module provides its own group (typically the group has the same name as the module). All available statistic variables are listed and documented : statistics provided by OpenSIPS core or by OpenSIPS modules (see the Statistics chapter for each module). UsageTo get access to the statistics you have to use the MI interface which provides (directly from OpenSIPS core) several MI functions for: # get one statistic variable, by name > opensipsctl fifo get_statistics rcv_requests > core:rcv_requests = 3428 > opensipsctl fifo get_statistics real_used_size > shmem:real_used_size = 2951864 # get various statistic variables, by list of names > opensipsctl fifo get_statistics rcv_requests inuse_transactions > core:rcv_requests = 453 > tm:inuse_transactions = 10 # get all stats from a group > opensipsctl fifo get_statistics shmem: > shmem:total_size = 33554432 > shmem:used_size = 2897024 > shmem:real_used_size = 2951864 > shmem:max_used_size = 2952304 > shmem:free_size = 30602568 > shmem:fragments = 26 # get all stats from OpenSIPS > opensipsctl fifo get_statistics all >...........
Reseting a computed-value statistic will be ignored and have no effect. The MI reset_statistics command can be used here: # reset one statistic variable, by name > opensipsctl fifo reset_statistics rcv_requests |