From 9732cb4a92a883c7e9f7dcd928b6e22976a797ca Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Thu, 1 Oct 2015 20:43:53 +0200 Subject: stats: Add stat_item for value monitoring This commit adds instrumentation function to gather measurement and statistical values similar to counter groups. Multiple values can be stored per item, which can be retrieved in FIFO order. Getting values from the item does not modify its state to allow for multiple independant backends (e.g. VTY and statd). When a new value is set, the oldest value gets silently overwritten. Lost values are skipped when getting values from the item. Sponsored-by: On-Waves ehf --- include/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'include/Makefile.am') diff --git a/include/Makefile.am b/include/Makefile.am index 52c6a38f..7f8dd777 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -28,6 +28,7 @@ nobase_include_HEADERS = \ osmocom/core/prim.h \ osmocom/core/process.h \ osmocom/core/rate_ctr.h \ + osmocom/core/stat_item.h \ osmocom/core/select.h \ osmocom/core/signal.h \ osmocom/core/socket.h \ -- cgit v1.2.3 From 45513e6040195f5494d40a2750de4dac7037593f Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 19 Oct 2015 15:14:13 +0200 Subject: stats/vty: Add stats_vty.c This file will contain the VTY code related to statistics. This commit adds a minimal file with just as single VTY command: - show stats This command shows all statistical values To enable this and future commands, the main program needs to call stats_vty_add_cmds(). Sponsored-by: On-Waves ehf --- include/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'include/Makefile.am') diff --git a/include/Makefile.am b/include/Makefile.am index 7f8dd777..af189c36 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -113,6 +113,7 @@ nobase_include_HEADERS += \ osmocom/vty/buffer.h \ osmocom/vty/command.h \ osmocom/vty/logging.h \ + osmocom/vty/stats.h \ osmocom/vty/misc.h \ osmocom/vty/telnet_interface.h \ osmocom/vty/vector.h \ -- cgit v1.2.3 From 95bf828003b065f00a78144296072a9730cbf7bc Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 20 Oct 2015 19:05:52 +0200 Subject: stats: Add the reporting framework This commit provides the stats reporting framework that can manage several types of measurement reporters. Initially support for rate_ctr and the statsd protocol is included. Sponsored-by: On-Waves ehf --- include/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'include/Makefile.am') diff --git a/include/Makefile.am b/include/Makefile.am index af189c36..20735800 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -22,6 +22,7 @@ nobase_include_HEADERS = \ osmocom/core/linuxrbtree.h \ osmocom/core/logging.h \ osmocom/core/loggingrb.h \ + osmocom/core/stats.h \ osmocom/core/macaddr.h \ osmocom/core/msgb.h \ osmocom/core/panic.h \ -- cgit v1.2.3