sip_get_counter_value man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

SIP_ENABLE_COUNTERS(3SIP)			     SIP_ENABLE_COUNTERS(3SIP)

NAME
       sip_enable_counters,   sip_disable_counters,   sip_get_counter_value  -
       counter operations

SYNOPSIS
       cc [ flag... ] file... -lsip [ library... ]
       #include <sip.h>

       int sip_enable_counters(int counter_group);

       int sip_disable_counters(int counter_group);

       int sip_get_counter_value(int group, int counter, void *counterval,
	    size_t counterlen);

DESCRIPTION
       The sip_enable_counters() function enables the measurement and counting
       of  the	selected  counter  group.  The	only  allowed  value  for  the
       counter_group is SIP_TRAFFIC_COUNTERS, which  is	 defined  in  <sip.h>.
       Once  enabled,  the  SIP stack starts measuring end-to-end SIP traffic.
       The SIP stack keeps track of:

	   o	  the number of SIP requests sent and received (broken down by
		  methods),

	   o	  the  number  of SIP responses sent and received (broken down
		  by response codes), and

	   o	  the number of bytes sent and received.

       The following counters are defined in <sip.h> for the SIP_TRAFFIC_COUN‐
       TERS   group.   These   counter	 values	  are	retrieved   using  the
       sip_get_counter_value() function.

	 SIP_TOTAL_BYTES_RCVD
	 SIP_TOTAL_BYTES_SENT
	 SIP_TOTAL_REQ_RCVD
	 SIP_TOTAL_REQ_SENT
	 SIP_TOTAL_RESP_RCVD
	 SIP_TOTAL_RESP_SENT
	 SIP_ACK_REQ_RCVD
	 SIP_ACK_REQ_SENT
	 SIP_BYE_REQ_RCVD
	 SIP_BYE_REQ_SENT
	 SIP_CANCEL_REQ_RCVD
	 SIP_CANCEL_REQ_SENT
	 SIP_INFO_REQ_RCVD
	 SIP_INFO_REQ_SENT
	 SIP_INVITE_REQ_RCVD
	 SIP_INVITE_REQ_SENT
	 SIP_NOTIFY_REQ_RCVD
	 SIP_NOTIFY_REQ_SENT
	 SIP_OPTIONS_REQ_RCVD
	 SIP_OPTIONS_REQ_SENT
	 SIP_PRACK_REQ_RCVD
	 SIP_PRACK_REQ_SENT
	 SIP_REFER_REQ_RCVD
	 SIP_REFER_REQ_SENT
	 SIP_REGISTER_REQ_RCVD
	 SIP_REGISTER_REQ_SENT
	 SIP_SUBSCRIBE_REQ_RCVD
	 SIP_SUBSCRIBE_REQ_SENT
	 SIP_UPDATE_REQ_RCVD
	 SIP_UPDATE_REQ_SENT
	 SIP_1XX_RESP_RCVD
	 SIP_1XX_RESP_SENT
	 SIP_2XX_RESP_RCVD
	 SIP_2XX_RESP_SENT
	 SIP_3XX_RESP_RCVD
	 SIP_3XX_RESP_SENT
	 SIP_4XX_RESP_RCVD
	 SIP_4XX_RESP_SENT
	 SIP_5XX_RESP_RCVD
	 SIP_5XX_RESP_SENT
	 SIP_6XX_RESP_RCVD
	 SIP_6xx_RESP_SENT
	 SIP_COUNTER_START_TIME	 /* records time when counting was enabled */
	 SIP_COUNTER_STOP_TIME	 /* records time when counting was disabled */

       All of the above counters  are  defined	to  be	uint64_t,  except  for
       SIP_COUNTER_START_TIME  and SIP_COUNTER_STOP_TIME, which are defined to
       be time_t.

       The sip_disable_counters() function disables measurement	 and  counting
       for  the specified counter_group. When disabled, the counter values are
       not reset and are retained until	 the  measurement  is  enabled	again.
       Calling	sip_enable_counters()  again would reset all counter values to
       zero and counting would start afresh.

       The sip_get_counter_value() function retrieves the value of the	speci‐
       fied counter within the specified counter group. The value is copied to
       the user provided buffer, counterval, of length counterlen.  For	 exam‐
       ple,  after  the	 following  call,  invite_rcvd	would have the correct
       value.

	 uint64_t invite_rcvd;

	 sip_get_counter_value(SIP_TRAFFIC_COUNTERS, SIP_INVITE_REQ_RCVD,
		 &invite_rcvd, sizeof (uint64_t));

RETURN VALUES
       Upon successful completion, sip_enable_counters() and sip_disable_coun‐
       ters() return 0. They will return EINVAL if an incorrect group is spec‐
       ified.

       Upon  successful	 completion,  sip_get_counter_value()  returns	0.  It
       returns	EINVAL	if an incorrect counter name or counter size is speci‐
       fied, or if counterval is NULL.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Committed	      │
       ├────────────────────┼─────────────────┤
       │MT-Level	    │ MT-Safe	      │
       └────────────────────┴─────────────────┘

SEE ALSO
       attributes(5)

				 Jan 11, 2008	     SIP_ENABLE_COUNTERS(3SIP)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net