The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Typedefs | Functions | Variables
stats.h File Reference

Structures and functions for statistics. More...

Go to the source code of this file.

Data Structures

struct  fr_stats_ema_t
 
struct  fr_stats_t
 

Macros

#define FR_STATS_INC(_x, _y)   radius_ ## _x ## _stats._y++;if (listener) listener->stats._y++;if (client) client->_x._y++;
 
#define FR_STATS_TYPE_INC(_x)   _x++
 

Typedefs

typedef uint32_t fr_uint_t
 

Functions

void fr_snmp_free (void)
 
int fr_snmp_init (void)
 Initialise the tree of SNMP map structures used to attach callbacks to OIDs. More...
 
int fr_snmp_process (request_t *request)
 
void fr_stats_bins (fr_stats_t *stats, fr_time_t start, fr_time_t end)
 Sort latency times into bins. More...
 
void radius_stats_ema (fr_stats_ema_t *ema, fr_time_t start, fr_time_t end)
 
void radius_stats_init (int flag)
 
void request_stats_final (request_t *request)
 

Variables

fr_stats_t radius_acct_stats
 
fr_stats_t radius_auth_stats
 

Detailed Description

Structures and functions for statistics.

Id
e3ee82510fa0ef1914114483d3c41e38164f127e

Definition in file stats.h.


Data Structure Documentation

◆ fr_stats_ema_t

struct fr_stats_ema_t

Definition at line 57 of file stats.h.

Data Fields
uint32_t ema1
uint32_t ema10
uint32_t f1
uint32_t f10
uint32_t window

◆ fr_stats_t

struct fr_stats_t

Definition at line 39 of file stats.h.

Data Fields
fr_uint_t elapsed[8]
time_t last_packet
fr_uint_t total_access_accepts
fr_uint_t total_access_challenges
fr_uint_t total_access_rejects
fr_uint_t total_bad_authenticators
fr_uint_t total_dup_requests
fr_uint_t total_invalid_requests
fr_uint_t total_malformed_requests
fr_uint_t total_no_records
fr_uint_t total_packets_dropped
fr_uint_t total_requests
fr_uint_t total_responses
fr_uint_t total_timeouts
fr_uint_t total_unknown_types

Macro Definition Documentation

◆ FR_STATS_INC

#define FR_STATS_INC (   _x,
  _y 
)    radius_ ## _x ## _stats._y++;if (listener) listener->stats._y++;if (client) client->_x._y++;

Definition at line 77 of file stats.h.

◆ FR_STATS_TYPE_INC

#define FR_STATS_TYPE_INC (   _x)    _x++

Definition at line 78 of file stats.h.

Typedef Documentation

◆ fr_uint_t

Definition at line 35 of file stats.h.

Function Documentation

◆ fr_snmp_free()

void fr_snmp_free ( void  )

Definition at line 1119 of file snmp.c.

+ Here is the caller graph for this function:

◆ fr_snmp_init()

int fr_snmp_init ( void  )

Initialise the tree of SNMP map structures used to attach callbacks to OIDs.

Definition at line 1101 of file snmp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_snmp_process()

int fr_snmp_process ( request_t request)

Definition at line 921 of file snmp.c.

+ Here is the call graph for this function:

◆ fr_stats_bins()

void fr_stats_bins ( fr_stats_t stats,
fr_time_t  start,
fr_time_t  end 
)

Sort latency times into bins.

This solves the problem of attempting to keep min/max/avg latencies, whilst not knowing what the polling frequency will be.

Parameters
[out]statsHolding monotonically increasing stats bins.
[in]startof the request.
[in]endof the request.

Definition at line 214 of file stats.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ radius_stats_ema()

void radius_stats_ema ( fr_stats_ema_t ema,
fr_time_t  start,
fr_time_t  end 
)

Definition at line 159 of file stats.c.

+ Here is the call graph for this function:

◆ radius_stats_init()

void radius_stats_init ( int  flag)

Definition at line 149 of file stats.c.

+ Here is the caller graph for this function:

◆ request_stats_final()

void request_stats_final ( request_t request)

Definition at line 48 of file stats.c.

+ Here is the call graph for this function:

Variable Documentation

◆ radius_acct_stats

fr_stats_t radius_acct_stats
extern

Definition at line 46 of file stats.c.

◆ radius_auth_stats

fr_stats_t radius_auth_stats
extern

Definition at line 45 of file stats.c.