summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * stats: Make net config optionalJacob Erlbeck2015-10-293-12/+31
| | | | | | | | | | | | | | | | To support reporters without network configuration, this commit introduces the have_net_config flag to provide corresponding error messages. Sponsored-by: On-Waves ehf
| * stats: Add missing mtu command to 'write' outputJacob Erlbeck2015-10-291-0/+3
| | | | | | | | | | | | | | Currently the config_write_stats_reporter function does not output the mtu value, which is fixed by this commit. Sponsored-by: On-Waves ehf
| * stats: Support statsd Multi-Metric PacketsJacob Erlbeck2015-10-293-11/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the MTU is given, combine several messages into a single UDP packet until the limit is reached. Flush all reporters after the values have been scanned. New vty commands (node config-stats): mtu <100-65535> Enable multi-metric packets and set the maximum packet size (in byte) no mtu Disable multi-metric packets Note that single messages that are longer than the given MTU (minus 28 octets protocol overhead) will be dropped. Sponsored-by: On-Waves ehf
| * stats: Add support for osmo_countersJacob Erlbeck2015-10-291-0/+32
| | | | | | | | | | | | | | | | | | This commit changes the reporting code to also show all modified osmo_counter values. Since there is no grouping of these values, the name string just consists of the optional prefix and the counter name. Sponsored-by: On-Waves ehf
| * core: Add difference function to osmo_counterJacob Erlbeck2015-10-292-0/+12
| | | | | | | | | | | | | | The osmo_counter_difference returns the counter value difference since the last call of this function with the given counter object. Sponsored-by: On-Waves ehf
| * stats: Report stat item valuesJacob Erlbeck2015-10-291-0/+49
| | | | | | | | | | | | | | | | | | Currently only rate counter are being supported. This commit adds support for stat items. All groups are polled for changed values. Sponsored-by: On-Waves ehf
| * stats: Implement timer based reportingJacob Erlbeck2015-10-293-18/+72
| | | | | | | | | | | | | | | | This calls stats_flush in regular intervals which polls the statistical values and calls the active reporters when values have changed. Sponsored-by: On-Waves ehf
| * stats/vty: Add stats configurationJacob Erlbeck2015-10-294-4/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit provides stats configuration similar to the log configuration. The following vty commands are added to the config node: stats reporter statsd Create/Modify a statsd reporter no stats reporter statsd Remove a statsd reporter To actually configure a reporter, the config-stats node is entered when the "stats reporter" command has succeeded. The following new vty commands are available there: local-ip ADDR Set the IP address to which we bind locally no local-ip Do not bind to a certain IP address remote-ip ADDR Set the remote IP address to which we connect remote-port <1-65535> Set the remote port to which we connect prefix PREFIX Set the item/counter name prefix no prefix Do not use a prefix enable Enable the reporter disable Disable the reporter Sponsored-by: On-Waves ehf
| * stats: Add the reporting frameworkJacob Erlbeck2015-10-294-1/+459
| | | | | | | | | | | | | | | | 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
| * stats/vty: Add stats_vty.cJacob Erlbeck2015-10-294-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * stat/vty: Add vty_out_statistics_full to show all statisticsJacob Erlbeck2015-10-282-0/+60
| | | | | | | | | | | | | | This functions shows the state of all osmo_counters, stat_item groups, and counter groups. Sponsored-by: On-Waves ehf
| * stat/vty: Use the iterator algorithms to show ctrg and statgJacob Erlbeck2015-10-281-20/+43
| | | | | | | | | | | | | | | | | | | | Currently the groups for stat_items and counter are iterated manually. This commit makes use of the new iterator functions to access the single elements via handlers. Sponsored-by: On-Waves ehf
| * core: Update osmo_counters_for_each docJacob Erlbeck2015-10-281-2/+2
| | | | | | | | | | | | | | Fix type and add a note about the semantics of the handler's return code. Sponsored-by: On-Waves ehf
| * stats: Add stat_item_for_each functionsJacob Erlbeck2015-10-282-0/+44
| | | | | | | | | | | | | | | | | | | | This commit adds the following functions: stat_item_for_each_group Call a handler for each group stat_item_for_each_item Call a handler for each item of a group Sponsored-by: On-Waves ehf
| * core: Extend rate_ctr by helper functionsJacob Erlbeck2015-10-282-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For global value reporting, some additional helper functions are needed. The statsd protocol expects differential counter values, which are currently not provided by rate_ctr (except for s/m/h/d intervals). This commit adds several helper functions to rate_ctr: - rate_ctr_difference returns the counter delta since the last call to this function for a given counter - rate_ctr_for_each_counter iterates through each counter of a group - rate_ctr_for_each_group iterates through all globally registered counter groups Note that the rate_ctr_difference function can only be used by a single backend, since it modifies the 'previous' field in the rate_ctr obj. Sponsored-by: On-Waves ehf
| * stats: Use a global index for stat item valuesJacob Erlbeck2015-10-283-47/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently each stat item has a separate index value which basically counts each single value added to the item and which can be used by a reporter to get all new values that have not been reported yet. The drawback is, that such an index must be stored for each stat item. This commit introduces a global index which is incremented for each new stat item value. This index is then stored together with the item value. So a single stored index per reporter is sufficient to make sure that only new values are reported. Sponsored-by: On-Waves ehf
| * ns: Add statistics for some eventsJacob Erlbeck2015-10-283-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | The following counters are added to the ns.nsvc counter group: lost.alive The number of missing ALIVE ACK messages lost.reset The number of missing RESET ACK messages The following items are added to the ns.nsvc stat item group: alive.delay The time in ms between sending ALIVE and receiving the next ALIVE ACK Sponsored-by: On-Waves ehf
| * stats: Add vty_out_stat_item_groupJacob Erlbeck2015-10-283-5/+31
| | | | | | | | | | | | This functions dumps a whole stat item group to the VTY. Sponsored-by: On-Waves ehf
| * stats: Add stat_item for value monitoringJacob Erlbeck2015-10-289-3/+531
|/ | | | | | | | | | | | | | 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
* commentsNeels Hofmeyr2015-10-092-3/+4
|
* ipaccess: add OAP proto_ext (in design).Neels Hofmeyr2015-09-231-0/+1
|
* utils: add 'returns' doc to osmo_hexparse().Neels Hofmeyr2015-09-231-0/+1
|
* build: have a disable-static build succeedJan Engelhardt2015-09-163-7/+9
| | | | | | | | | | | | | When using configure --disable-static, no libosmogsm.a will be created, and the tests fail to link because symbols like _a5_3 and _a5_4 are not exported through the only remaining libosmogsm.so. A method to overcome this is an intermediate private non-distributed library, examples of which are present in e.g. libabc, kmod and systemd. With this, disable-static can now be the default and practical compile time be halved.
* Prepare new upstream releaseHolger Hans Peter Freyther2015-08-235-4/+9
|
* build: Enable subdir-objectsSylvain Munaut2015-08-191-1/+1
| | | | | | | This fixes warning (and even build on some newer automake). This should now work in the CI as well thanks to the fix for tests. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* tests: Don't reference file in src/ to test hidden func. Use static link.Sylvain Munaut2015-08-191-2/+3
| | | | | | | Taken from: https://qiaomuf.wordpress.com/2011/03/27/handling-unit-test-with-c-visibilityhidden/ Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Introduce gsm48_mi_type_name() functionHarald Welte2015-08-183-0/+16
|