libosmocore 1.13.1.1-afb4 Osmocom core library

Data Structures | Enumerations | Functions | Variables
stats.h File Reference
Statistics reporting
`#include <sys/socket.h>`
`#include <arpa/inet.h>`
`#include <osmocom/core/linuxlist.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Data Structures
struct | osmo_stats_reporter
| One statistics reporter instance. More...
struct | osmo_stats_config

## Enumerations
enum | osmo_stats_class { OSMO_STATS_CLASS_UNKNOWN , OSMO_STATS_CLASS_GLOBAL , OSMO_STATS_CLASS_PEER , OSMO_STATS_CLASS_SUBSCRIBER }
| Statistics Class definitions. More...
enum | osmo_stats_reporter_type { OSMO_STATS_REPORTER_LOG , OSMO_STATS_REPORTER_STATSD }
| Statistics Reporter Type. More...

## Functions
void | osmo_stats_init (void *ctx)
| Initialize the stats reporting module; call this once in your program. More...
int | osmo_stats_report (void)
int | osmo_stats_set_interval (int interval)
| Set the reporting interval (common for all reporters) More...
struct osmo_stats_reporter * | osmo_stats_reporter_alloc (enum osmo_stats_reporter_type type, const char *name)
void | osmo_stats_reporter_free (struct osmo_stats_reporter *srep)
| Destroy a given stats_reporter. More...
struct osmo_stats_reporter * | osmo_stats_reporter_find (enum osmo_stats_reporter_type type, const char *name)
| Find a stats_reporter of given type and name. More...
int | osmo_stats_reporter_set_remote_addr (struct osmo_stats_reporter *srep, const char *addr)
int | osmo_stats_reporter_set_remote_port (struct osmo_stats_reporter *srep, int port)
int | osmo_stats_reporter_set_local_addr (struct osmo_stats_reporter *srep, const char *addr)
int | osmo_stats_reporter_set_mtu (struct osmo_stats_reporter *srep, int mtu)
int | osmo_stats_reporter_set_max_class (struct osmo_stats_reporter *srep, enum osmo_stats_class class_id)
int | osmo_stats_reporter_set_name_prefix (struct osmo_stats_reporter *srep, const char *prefix)
| Set the name prefix of a given stats_reporter. More...
int | osmo_stats_reporter_enable (struct osmo_stats_reporter *srep)
| Enable the given stats_reporter. More...
int | osmo_stats_reporter_disable (struct osmo_stats_reporter *srep)
| Disable the given stats_reporter. More...
int | osmo_stats_reporter_set_flush_period (struct osmo_stats_reporter *srep, unsigned int period)
| Set the regular flush period for a given stats_reporter. More...
struct osmo_stats_reporter * | osmo_stats_reporter_create_log (const char *name)
| Create a stats_reporter that logs via libosmocore logging. More...
struct osmo_stats_reporter * | osmo_stats_reporter_create_statsd (const char *name)
| Create a stats_reporter reporting to statsd. More...
int | osmo_stats_reporter_send (struct osmo_stats_reporter *srep, const char *data, int data_len)
int | osmo_stats_reporter_send_buffer (struct osmo_stats_reporter *srep)
int | osmo_stats_reporter_udp_open (struct osmo_stats_reporter *srep)
int | osmo_stats_reporter_udp_close (struct osmo_stats_reporter *srep)

## Variables
struct llist_head | osmo_stats_reporter_list
struct osmo_stats_config * | osmo_stats_config