SIP Witch 1.9.15
|
A stat element of call traffic. More...
#include <stats.h>
Public Types | |
enum | stat_t { INCOMING = 0, OUTGOING = 1 } |
Public Member Functions | |
void | assign (stat_t element) |
Assign a call to inbound or outbound statistic for this stat node. More... | |
void | release (stat_t element) |
Release a call from inbound or outbound stastic for this stat node. More... | |
unsigned | active (void) const |
Total number of active calls in the server at the moment. More... | |
Static Public Member Functions | |
static void | period (FILE *file=NULL) |
Write out statistics to a file for the current period. More... | |
static stats * | create (void) |
Create stats in shared memory pool. More... | |
static stats * | request (const char *id) |
Request a stat node from the memory pool by id. More... | |
static void | allocate (unsigned count) |
Server allocate x number of stat nodes at startup. More... | |
static void | release (void) |
Release stat nodes shared memory segment. More... | |
Data Fields | |
char | id [12] |
struct { | |
unsigned long total | |
unsigned long period | |
unsigned long pperiod | |
unsigned short current | |
unsigned short peak | |
unsigned short min | |
unsigned short max | |
unsigned short pmin | |
unsigned short pmax | |
} | data [2] |
We have stats for both incoming and outgoing traffic of various kinds. More... | |
time_t | lastcall |
unsigned short | limit |
A stat element of call traffic.
Stats may cover a specific element for a current time period, and total stats for the life of the server. This is used to determine server utilization, to determine peak times such as may be needed for acd traffic analysis, and to categorize the kind of traffic we are processing through the server. There is a "system" stat node for ALL server call traffic, as well as nodes for collecting stats on all extensions, on all service entries, etc.
unsigned sipwitch::stats::active | ( | void | ) | const |
|
static |
void sipwitch::stats::assign | ( | stat_t | element | ) |
|
static |
|
static |
Write out statistics to a file for the current period.
The stats are also reset for the new period. The period is also the sync period of the sync event, and is set with the service::period method.
file | to write to or NULL for none. |
void sipwitch::stats::release | ( | stat_t | element | ) |
|
static |
|
static |
struct { ... } sipwitch::stats::data[2] |
We have stats for both incoming and outgoing traffic of various kinds.