summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* talloc: Untested change to unbreak buildHolger Hans Peter Freyther2015-12-101-1/+1
| | | | | In case talloc is not installed in the default search path we need to place @TALLOC_CFLAGS@ into the include directory as well.
* gsm_03_41: Fix structure definitions for big-endian machinesRuben Undheim2015-12-091-0/+31
| | | | | this was detected by debian packaging, as the associated gsm_03_41 test case fails on big endian machines like ppc.
* update debian packaging from libosmocore6 to libosmocore7Harald Welte2015-12-082-2/+2
|
* utils: add TALLOC_CFLAGS to buildHarald Welte2015-12-081-1/+1
| | | | this is an attempt to fix the FreeBSD build
* stats: Add OSMO prefix to STAT_ITEM_NOVALUE_IDJacob Erlbeck2015-12-082-4/+4
| | | | | | | This symbol is globally visible and therefore should have an OSMO prefix like the other identifiers exported by stat_item.h. Sponsored-by: On-Waves ehf
* stat: Explicitly support stat_items without unitJacob Erlbeck2015-12-083-2/+16
| | | | | | | Add OSMO_STAT_ITEM_NO_UNIT for stat items without an unit. The statsd reporter uses gauges ("g") to report them. Sponsored-by: On-Waves ehf
* remove our internal copy of talloc, use system libtallocHarald Welte2015-12-0517-2089/+28
| | | | | | | Shipping our own private copy of talloc was a good idea in 2008, when it was not readily available on most target platforms. Today, the situation is quite different, as it is a standard library on major Linux distributions.
* stats: Add TODO comment to rate_ctrJacob Erlbeck2015-11-261-0/+3
| | | | | | | | | | Currently the counters are scanned twice, once for interval computation and once for reporting. This adds a reminder to move the interval computation code to a special stats reporter which just shall update the fields. Sponsored-by: On-Waves ehf
* stats/test: Add memory leak checkJacob Erlbeck2015-11-261-4/+9
| | | | | | Adds a rudimentary leak check for the counters and stat items. Sponsored-by: On-Waves ehf
* stats/test: Add test for reportingJacob Erlbeck2015-11-262-17/+369
| | | | | | | | | | | | | | This tests uses a dedicated test reported to check several aspects of the value reporting. - addition/removal of stats reporter - addition/removal of counters/items - setting of max_class - initial value flush - updating single counters/items - reporter retrieval - enable/disable Sponsored-by: On-Waves ehf
* stats: Reorder functions in stats.cJacob Erlbeck2015-11-261-59/+61
| | | | | | | Due to prior refactoring, the functions do not have an sensible order in the file. This commit tries to improve that a little bit. Sponsored-by: On-Waves ehf
* stats: Move statsd related code into a separate fileJacob Erlbeck2015-11-264-144/+180
| | | | | | | | | | | This commit moves the stats specific code parts into stats_statsd.c while keeping the generic parts in stats.c. The code in stats.c no longer contains references to statsd symbols. Note that the VTY code still needs to know about every stats reporter backend. Sponsored-by: On-Waves ehf
* configure: It should be --with-system-talloc, not --enable-system-tallocHarald Welte2015-11-211-8/+8
| | | | | | As we are making a decision whether we should use an existing system library, we call it --with-system-talloc, rather than --enable-system-talloc.
* configure.ac: Use AS_IF() instead of shell-if for PKG_CONFIGHarald Welte2015-11-211-4/+4
| | | | | | | | | | | | | https://autotools.io/pkgconfig/pkg_check_modules.html > If you have the first call to PKG_CHECK_MODULES inside a bash > conditional block, the expansion of PKG_PROG_PKG_CONFIG will also be > conditional > You can solve this problem in two ways; you can either explicitly call > PKG_PROG_PKG_CONFIG outside of any conditional, forcing checking for > pkg-config as soon as possible; or you can rewrite your conditionals > to use the proper syntax
* use system-wide libtalloc with --enable-system-tallocHarald Welte2015-11-214-3/+59
| | | | | | | | | This introduces a new configure flag by which the libosmocore-internal talloc code is not compiled, but rather a system-wide libtalloc is used. When we started openbsc/libosmocore in 2008, libtalloc was not widely present on systems yet. This has changed meanwhile, and we should simply use the system-wide library
* stat_item.c: Fix compiler warningsHarald Welte2015-11-201-2/+2
| | | | | | | | | | | CC stat_item.lo stat_item.c: In function 'osmo_stat_item_group_alloc': stat_item.c:84:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] group->items[item_idx] = (void *)items_size; ^ stat_item.c:98:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ((uint8_t *)items + (int)group->items[item_idx]); ^
* vty: Don't call exit() but rather use OSMO_ASSERT()Harald Welte2015-11-121-15/+4
| | | | | This was pointed out by Jaroslav Skarvada during fedora packaging, and he has a valid point...
* fix FSF address in sources/headersJaroslav Škarvada2015-11-129-15/+18
| | | | Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
* debian: Make a new minor releaseHolger Hans Peter Freyther2015-11-091-0/+8
|
* stats: Fix not reported stat item valuesJacob Erlbeck2015-11-091-1/+3
| | | | | | | | | | | | Currently the global stat item index is being advanced in osmo_stat_item_group_handler, so that the second and further groups in the list will skip new item values. This commit moves the call to osmo_stat_item_discard_all into osmo_stats_report to a place where all groups have been processed already. Sponsored-by: On-Waves ehf
* stats: Fix handling of multiple resportersJacob Erlbeck2015-11-091-2/+2
| | | | | | | | | | | | | Currently the reporter loop is aborted, if the event would be ignored due to an insufficient max_level. Thus the reporters that happen to be stored afterwards would be skipped even if their level were sufficient. This commit replaces the conditional 'return' statement by a considtional 'continue' statement to ensure the processing of the list tail. Sponsored-by: On-Waves ehf
* stats: Send all values on reporter updateJacob Erlbeck2015-11-092-8/+26
| | | | | | | | | | | | | | | | | | | | | Currently only counter changes and new item values are being reported. This makes it cumbersome to configure reporting clients, since there is nothing like a list of all parameters. This commit changes this behaviour such that all currently existing counters and items that would be reported eventually, are passed to the reporter when it has been reconfigured or enabled. If a counter has not been incremented, 0 is sent. If a stat item value has not been added, the last item value (or the default value if there is none) is resent again. Note that this will not catch transient counters/items that will be created later on, e.g. triggered by new peers or subscribers. To just force this kind of dump on a running reporter, it is sufficient to invoke the 'enable' command in its configuration node. Sponsored-by: On-Waves ehf
* stats: Fix name prefix handlingJacob Erlbeck2015-11-091-11/+23
| | | | | | | | | | | | | | Currently the having an unset prefix leads to an abort() in the statsd reporter due to an fprintf format string error. In addition the prefix cannot be reset to its initial state (NULL) by using 'no prefix', which just sets the prefix to the empty string, causing a single leading dot to appear in front of the name. This commit changes the implemenation to consistly use NULL for the unset name prefix ('no prefix') and to handle this case correctly in the statsd reporter. Sponsored-by: On-Waves ehf
* stats: Document the level in show stats level optionsHolger Hans Peter Freyther2015-11-071-0/+1
| | | | | | | Potentially Fixes: <command id='show stats level (global|peer|subscriber)'> <param name='subscriber' doc='(null)' />
* osmo-sim-test: add missing includeAlexander Huemer2015-11-071-0/+1
|
* debian: Roll a new release with the GPRS NS counter fixHolger Hans Peter Freyther2015-11-041-0/+6
|
* gprs-ns/stats: When the NSVCI is updated, update the stats counterHolger Hans Peter Freyther2015-11-043-0/+13
| | | | | | | | | | | The NS object is created with an unknown identity and only after the reset procedure has progressed (completed?) we know the real ID for this peer. Before nobody has looked at the idx values (this could have been seen with the CTRL interface) but with statsd the wrong NSVCI becomes obvious. Add routines to update the idx and I don't know if the change of idx is causing any issues but we will find that out soon.
* debian: Make new minor release with the NS bugfixHolger Hans Peter Freyther2015-11-041-0/+6
|
* stats/vty: Add selective show stats commandJacob Erlbeck2015-08-223-2/+33
| | | | | | | | | | | | | | | | Currently there is only the 'show stats' command which shows all counter and stat_item values. This can lead to many lines of output if there are per-subscriber rate counters. The new command added by this commit allows it to only show groups of a certain level (class_id), similar to the 'level' configuration command for stats reporter. The new command is show stats level (global|peer|subscriber) Sponsored-by: On-Waves ehf
* ns/stats: Fix class_id of "NSVC Peer Statistics" rate_ctr groupJacob Erlbeck2015-08-221-0/+1
| | | | | | | | | Currently the class_id is not set which effectively puts these groups into the 'subscriber' class. This commit adds the missing initialisation value. Sponsored-by: On-Waves ehf
* stats/test: Add tests to check VTY configurationJacob Erlbeck2015-08-222-0/+194
| | | | | | | This commit adds tests to verify the stats related VTY configuration commands. Sponsored-by: On-Waves ehf
* vty/test: Refactor vty creation/deletion into separate functionsJacob Erlbeck2015-08-221-29/+46
| | | | | | | | | | Currently this is part of the only test function that uses the vty directly. In preperation for more such test cases, this commit moves this code into separate functions. Sponsored-by: On-Waves ehf
* test: Remove unneeded linking to libosmovty.laJacob Erlbeck2015-08-221-4/+4
| | | | | | | | | | The addition of libosmovty.la to several test cases as done in commit 738d9e22108a8e47245 (stats: Add vty_out_stat_item_group) is not needed. This commit removes them. Sponsored-by: On-Waves ehf
* debian: Install libosmoctrl0 too when installing the dev packageHolger Hans Peter Freyther2015-11-031-1/+1
|
* misc: Prepare the release of libosmocore 0.9.0Holger Hans Peter Freyther2015-11-036-6/+11
| | | | | Bump the ABI version of libosmovty and we need to do this recursively to force rebuilds of our software.
* stats: Fix build on FreeBSDHolger Hans Peter Freyther2015-08-212-1/+4
| | | | | include stdint.h for int64_t and use netinet/in.h and not netinet/ip.h for getting sockaddr_in and such.
* timer: Fix compiler warning about timevalHolger Hans Peter Freyther2015-08-211-3/+4
| | | | | | | | | timer.c:27:23: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct timeval' [-Wtentative-definition-incomplete-type] static struct timeval nearest; ^ timer.c:27:15: note: forward declaration of 'struct timeval' static struct timeval nearest;
* gtphub: add OSMO_VTY_PORT_GTPHUB.Neels Hofmeyr2015-11-021-0/+1
| | | | | | This is for gtphub, being developed in openbsc.git. Sponsored-by: On-Waves ehi
* fix some typosNeels Hofmeyr2015-11-023-7/+7
| | | | Sponsored-by: On-Waves ehi
* Merge branch 'jerlbeck/wip/stats'Holger Hans Peter Freyther2015-11-0229-27/+2135
|\ | | | | | | | | | | | | * This adds a new counter type (to measure time or delay) * A statsd reporting backend. This can be fed into graphite or similar tools. * A periodic log backend for performance values
| * stats: Fix handling of the no mtu commandHolger Hans Peter Freyther2015-11-021-1/+1
| | | | | | | | | | | | | | For the atoi we need to pass the val as a string. This means we need to write "0" which then gets parsed to 0. [src/vty/stats_vty.c:90]: (error) Possible null pointer dereference: val
| * stats: Do not assign the wrong addresssHolger Hans Peter Freyther2015-11-021-1/+1
| | | | | | | | | | | | | | | | we need to put the default value into inaddr and not put a 32bit value into the addr pointer. Spotted by cppcheck: [src/stats.c:231]: (error) Uninitialized variable: inaddr
| * stats: Remove warnings about never read variablesHolger Hans Peter Freyther2015-11-021-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing is being done with these return values. Remove them for now and update the TODO entry that is present at two of the three places. stats.c: In function ‘rate_ctr_handler’: stats.c:570:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^ stats.c: In function ‘osmo_stat_item_handler’: stats.c:617:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^ stats.c: In function ‘handle_counter’: stats.c:651:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc;
| * log: Add new DLSTATS log levelJacob Erlbeck2015-11-023-5/+8
| | | | | | | | | | | | | | | | This log level is used by the stats subsystem log reporter to report statistics to level INFO. Note that the default level of DLSTATS is NOTICE. Sponsored-by: On-Waves ehf
| * stats: Limit reporting by class idJacob Erlbeck2015-11-027-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds class_id fields to the rate_ctr and stat_item group descriptions. The stats reporter code is extended to only process groups whose class_id does not exceed a per reporter max_class level. If the class_id is not set, the code assumes 'global' for groups with idx == 0 and 'subscriber' otherwise. The following vty command is added to config-stats: level (global|peer|subscriber) Set the maximum group level Sponsored-by: On-Waves ehf
| * stats: Report group indices as unsigned intJacob Erlbeck2015-11-021-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | Currently the unsigned group index value is silently being cast to (signed) int in the log and statsd reporter code. If the resulting value is negative (which can happen for instance with MMCTX counters), the index is assumed to be unset. This commit changes the affected types to unsigned. The index value 0 is then the only value indicating an unset group. Sponsored-by: On-Waves ehf
| * vty: Add reserved nodes to enum node_typeJacob Erlbeck2015-11-022-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently every time a node is added to enum node_type, this constitutes an ABI change, since _LAST_OSMOVTY_NODE will get incremented accordingly. In this case, every project that adds new node type based on that value will have to be recompiled. This commit adds 4 spare node type values, which can be replaced one-by-one by new real types until they are exhausted to avoid this kind of ABI change. Sponsored-by: On-Waves ehf
| * stats: Add osmo_ name prefix to identifiersJacob Erlbeck2015-11-0211-312/+312
| | | | | | | | | | | | | | | | | | | | Since the the stat_item and stats functions and data types are meant to be exported, they get an osmo_ prefix. Sponsored-by: On-Waves ehf [hfreyther: Prepended the enum values too. This was requested by Jacob]
| * stats: Add log reporterJacob Erlbeck2015-10-293-0/+115
| | | | | | | | | | | | | | This reporter passes the measurement values to the logging subsystem as DSTATS (which is currently DLGLOBAL) level INFO messages. Sponsored-by: On-Waves ehf
| * stats: Use function pointers in reporter objectsJacob Erlbeck2015-10-292-25/+40
| | | | | | | | | | | | | | | | | | | | | | | | Currently case statements are used to select the right reporter functions. This makes it difficult to add new reporter types, especially if they are not going to reside in the same file. This commit introduces per reporter function pointer for open, close, send_count, and send_item. They are checked for non-NULL before being called or skipped. Sponsored-by: On-Waves ehf