Documentation |
Documentation -> Manuals -> Manual 3.5 -> Core StatisticsPages 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
Table of Content (hide)
The OpenSIPS core exports several statistics, which are grouped into classes. To view all statistics which correspond to a class, fetch the "class:" statistic (e.g. opensips-cli -x mi get_statistics load: core: shmem:) 1. "CORE" class1.1 rcv_requestsReturns the total number of received requests by OpenSIPS. Example of usage through MI FIFO opensips-cli -x mi get_statistics rcv_requests Example of usage from script xlog("Total number of received requests = $stat(rcv_requests) \n"); 1.2 rcv_repliesReturns the total number of received replies by OpenSIPS. Example of usage through MI FIFO opensips-cli -x mi get_statistics rcv_replies Example of usage from script xlog("Total number of received replies = $stat(rcv_replies) \n"); 1.3 fwd_requestsReturns the number of stateless forwarded requests by OpenSIPS. Example of usage through MI FIFO opensips-cli -x mi get_statistics fwd_requests Example of usage from script xlog("Total number of forwarded requests = $stat(fwd_requests) \n"); 1.4 fwd_repliesReturns the number of stateless forwarded replies by OpenSIPS. Example of usage through MI FIFO opensips-cli -x mi get_statistics fwd_replies Example of usage from script xlog("Total number of forwarded replies = $stat(fwd_replies) \n"); 1.5 drop_requestsReturns the number of requests dropped even before entering the script routing logic. Example of usage through MI FIFO opensips-cli -x mi get_statistics drop_requests Example of usage from script xlog("Total number of dropped requests = $stat(drop_requests) \n"); 1.6 drop_repliesReturns the number of replies dropped even before entering the script routing logic, or explicitly dropped in the onreply_route. Example of usage through MI FIFO opensips-cli -x mi get_statistics drop_replies Example of usage from script xlog("Total number of dropped replies = $stat(drop_replies) \n"); 1.7 err_requestsReturns the number of bogus requests from SIP point of view ( eg. : No VIA header found ) Example of usage through MI FIFO opensips-cli -x mi get_statistics err_requests Example of usage from script xlog("Total number of error requests = $stat(err_requests) \n"); 1.8 err_repliesReturns the number of bogus replies from SIP point of view ( eg. : No VIA header found ) Example of usage through MI FIFO opensips-cli -x mi get_statistics err_replies Example of usage from script xlog("Total number of error replies = $stat(err_replies) \n"); 1.9 bad_URIs_rcvdReturns the number of URIs that OpenSIPS failed to parse. Example of usage through MI FIFO opensips-cli -x mi get_statistics bad_URIs_rcvd Example of usage from script xlog("Total number of bad URIs detected = $stat(bad_URIs_rcvd) \n"); Example of usage from script xlog("Total number of unsupported methods detected = $stat(unsupported_methods) \n"); 1.10 bad_msg_hdrReturns the number of SIP headers that OpenSIPS failed to parse. Example of usage through MI FIFO opensips-cli -x mi get_statistics bad_msg_hdr Example of usage from script xlog("Total number of headers that failed to parse = $stat(bad_msg_hdr) \n"); 1.11 timestampReturns the number of seconds elapsed from OpenSIPS starting. Example of usage through MI FIFO opensips-cli -x mi get_statistics timestamp Example of usage from script xlog("OpenSIPS has been alive for $stat(timestamp) seconds \n"); 2. "LOAD" classStatistics giving information about the OpenSIPS internal load. The load is defined as percentage of time spent in doing processing versus total time. Following the model of "top", there are three load values, calculated over different periods of time:
All three load values are provided by OpenSIPS in a per-process manner (the load of each process) and globally (covering all processes). 2.1 load ¶The realtime load of entire OpenSIPS - this counts all the core processes of OpenSIPS; the additional processes requested by modules are not counted in this load. Also note that some core processes are not counted as they do not generate any kind of load; such processes are the attendant, the time keeper and the timer trigger. This statistic is actually reflecting the load generated by processing the SIP traffic (as only the core active processes are counted). Example of usage through MI FIFO opensips-cli -x mi get_statistics load load:load:: 24 Example of usage from script xlog("The OpenSIPS processing load is $stat(load) \n"); 2.2 load1m ¶The last minute average load of core OpenSIPS (covering only core/SIP processes). For more, see load. 2.3 load10m ¶The last 10 minutes average load of core OpenSIPS (covering only core/SIP processes). For more, see load. 2.4 load-all ¶The realtime load of entire OpenSIPS, counting both core and module processes. Similar to [[#load|load], the processes not generating load at all are not counted. Example of usage through MI FIFO opensips-cli -x mi get_statistics load-all load:load-all:: 24 Example of usage from script xlog("The overall OpenSIPS load is $stat(load-all) \n"); 2.5 load1m-all ¶The last minute average load of entire OpenSIPS (covering all processes). For more, see load-all. 2.6 load10m-all ¶The last 10 minutes average load of entire OpenSIPS (covering all processes). For more, see load-all. 2.7 load-proc-id ¶The realtime load of the process ID. To learn the IDs of the OpenSIPS processes (and their types), use the ps MI command. Example of usage through MI FIFO opensips-cli -x mi get_statistics load-proc-5 load:load-proc-5:: 79 Example of usage from script xlog("The load of processes 5 is $stat(load-proc-5) \n"); 2.8 load1m-proc-id ¶The last minute average load of the process ID. For more, see load-proc-id. 2.9 load10m-proc-id ¶The last 10 minutes average load of the process ID. For more, see load-proc-id. 3. "NET" classStatistics giving information about UDP, TCP and TLS buffers on interfaces that OpenSIPS is listening on. 3.1 waiting_udpReturns the number of bytes waiting to be consumed on UDP interfaces that OpenSIPS is listening on. Example of usage through MI FIFO opensips-cli -x mi get_statistics waiting_udp Example of usage from script xlog("The UDP waiting buffer size is $stat(waiting_udp) \n"); 3.2 waiting_tcpReturns the number of bytes waiting to be consumed on TCP interfaces that OpenSIPS is listening on. Example of usage through MI FIFO opensips-cli -x mi get_statistics waiting_tcp Example of usage from script xlog("The TCP waiting buffer size is $stat(waiting_tcp) \n"); 3.3 waiting_tlsReturns the number of bytes waiting to be consumed on TLS interfaces that OpenSIPS is listening on. Example of usage through MI FIFO opensips-cli -x mi get_statistics waiting_tls Example of usage from script xlog("The TLS waiting buffer size is $stat(waiting_tls) \n"); 4. "SHMEM" classStatistics giving information on the shared memory that OpenSIPS is using. 4.1 total_sizeReturns the total size of shared memory available to OpenSIPS processes. Example of usage through MI FIFO opensips-cli -x mi get_statistics total_size Example of usage from script xlog("Total size of SHMEM available is $stat(total_size) \n"); 4.2 used_sizeReturns the amount of shared memory requested and used by OpenSIPS processes. Example of usage through MI FIFO opensips-cli -x mi get_statistics used_size Example of usage from script xlog("SHMEM in use = $stat(used_size) \n"); 4.3 real_used_sizeReturns the amount of shared memory requested by OpenSIPS processes + malloc overhead Example of usage through MI FIFO opensips-cli -x mi get_statistics real_used_size Example of usage from script xlog("Real SHMEM used size is $stat(real_used_size) \n"); 4.4 max_used_sizeReturns the maximum amount of shared memory ever used by OpenSIPS processes. Example of usage through MI FIFO opensips-cli -x mi get_statistics max_used_size Example of usage from script xlog("The max SHMEM ever used is $stat(max_used_size) \n"); 4.5 free_sizeReturns the free memory available. Computed as total_size - real_used_size Example of usage through MI FIFO opensips-cli -x mi get_statistics free_size Example of usage from script xlog("Free SHMEM available is $stat(free_size) \n"); 4.6 fragmentsReturns the total number of fragments in the shared memory. Example of usage through MI FIFO opensips-cli -x mi get_statistics fragments Example of usage from script xlog("The total number of SHMEM fragments is $stat(fragments) \n"); 5. "PKMEM" classVarious private memory related statistics for each OpenSIPS process. Each "PKMEM" statistic is prefixed by a number, representing the index of an OpenSIPS process (0, 1, ...). 5.1 N-total_sizeReturns the total size of private memory available to OpenSIPS process #N. Example of usage through MI FIFO opensips-cli -x mi get_statistics 0-total_size Example of usage from script xlog("Total size of PKG memory available for process #0 is $stat(0-total_size) \n"); 5.2 N-used_sizeReturns the amount of private memory requested and used by OpenSIPS process #N. Example of usage through MI FIFO opensips-cli -x mi get_statistics 0-used_size Example of usage from script xlog("PKG mem in use for process #1 = $stat(1-used_size) \n"); 5.3 N-real_used_sizeReturns the amount of private memory requested by OpenSIPS process #N, including allocator-specific metadata Example of usage through MI FIFO opensips-cli -x mi get_statistics 0-real_used_size Example of usage from script xlog("Process #0 actually uses $stat(0-real_used_size) bytes of private memory\n"); 5.4 N-max_used_sizeReturns the maximum amount of private memory ever used by OpenSIPS process #N. Example of usage through MI FIFO opensips-cli -x mi get_statistics 0-max_used_size Example of usage from script xlog("The max PKG memory ever used for process #0 is $stat(0-max_used_size) \n"); 5.5 N-free_sizeReturns the free private memory available for OpenSIPS process #N. Computed as total_size - real_used_size Example of usage through MI FIFO opensips-cli -x mi get_statistics 0-free_size Example of usage from script xlog("Free PKG memory available for process #0 is $stat(0-free_size) \n"); 5.6 N-fragmentsReturns the currently available number of free fragments in the private memory for OpenSIPS process #N. Example of usage through MI FIFO opensips-cli -x mi get_statistics 0-fragments Example of usage from script xlog("The total number of PKG fragments is $stat(0-fragments) \n"); |