libosmocore.git branch jerlbeck/wip/stats updated. 0.8.0-79-g06a64d7

gitosis at gitosis at
Thu Oct 29 00:10:36 UTC 2015

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "An utility library for Open Source Mobile Communications".

The branch, jerlbeck/wip/stats has been updated
  discards  d4182120a4d37d5652ca304c9ea9c2b912bacd98 (commit)
  discards  0d0cb333405a4083f110ed115104fed421def9dd (commit)
  discards  82ea42af9805fe7ef85470c31d055200bbd15e1c (commit)
  discards  2c61af36da6627bbe996d2c278c223cd477ccb8c (commit)
  discards  bdc285d78a08a7a0e68acf120e9f5c8340b5b5ff (commit)
  discards  865118f177412e5a15967c99d0313f9c8a06fcd7 (commit)
  discards  381d0b70435acff046fc6846900453b67c334ce1 (commit)
  discards  6f8ffb095865527786ac00fa1c5ca7e61a15ca9b (commit)
  discards  4b13c1117bb3947b680013bae4fbd8d770d31e2a (commit)
  discards  61c15b446a30ead953ed5c7546db5f1704d9afc4 (commit)
  discards  6db08153f557635368e6869d9c905cb5fbd37f08 (commit)
  discards  306175d38d46fe8125b9de2da2db0e7ee8b462b8 (commit)
  discards  397f69b1bdf177231dbf04672e5c4e1f8986d46a (commit)
  discards  1887cb3bad5c2da452915450a8e9c72062d12e2d (commit)
  discards  034facebe3c2b51c9b2b8c3fd39cc7ab4d94053c (commit)
  discards  21b76b289a38fc73fe338c2b6e9a11fb4489e7a3 (commit)
  discards  d15fcd6d2db616b4b2123f062966bbc313261187 (commit)
  discards  02906e0f1cfb1a4fb782c3badd7f598d57fab86c (commit)
  discards  c94cc5c013c10f1d1d3c485d7d4e11e5d26507fd (commit)
  discards  bb564f424f1b28e342a8bfb61d3280be39c0f332 (commit)
  discards  03a33a55cee72b9224048b507b389ba578e02b4f (commit)
  discards  557606458d5514b0af92cd3754a5b3c6b3ae34d6 (commit)
       via  06a64d7db2f93a996a074cfb9e1a8eacd3303eee (commit)
       via  bc4f7ae512b32fa4b569dfc5242d0b7a5da3f81b (commit)
       via  490b38f57a24726f3e3493fc3500cda526c5d0aa (commit)
       via  ed197fd4f923512fca5b93b90c2132845896fa59 (commit)
       via  4aa11770622ae9009074d68cc8c340821b19adf3 (commit)
       via  d01acfcc75a6c5798a95a8ccca9be18eba65a0bf (commit)
       via  c8f47b600f8e2ad21266d4c27e960e477e5fe35c (commit)
       via  80db4ec3875b0de7f06de769881d6c5d4b713f2d (commit)
       via  c27671c10935ee384d03a87170c3f31ab435da07 (commit)
       via  b1dbfb4c4179a62cd4b761ebdc7a3c2de5bdc0d9 (commit)
       via  adc900e0e38373193c8451c0310fe742d62c2c8e (commit)
       via  95bf828003b065f00a78144296072a9730cbf7bc (commit)
       via  45513e6040195f5494d40a2750de4dac7037593f (commit)
       via  7211fe157e1107d4a9c04a0ecf494a7b9633c400 (commit)
       via  aec583f68786f91c3f0d76a8f8706c85aaca07a8 (commit)
       via  e5b0fe2e3c84dd0de7021d65d416356612db4260 (commit)
       via  c6a7108828bf98ebcaf31d24bd8d789afdd4da94 (commit)
       via  423c1e5a4fc7ad2cd5e95e852b778c7e2c892bc1 (commit)
       via  b27b352e937dd0760da1e7fb05f9207be05702b8 (commit)
       via  0a1400fc8311268d0a66bb20e0620e546e8d11c8 (commit)
       via  738d9e22108a8e472458fad42509fd8d96994d6c (commit)
       via  9732cb4a92a883c7e9f7dcd928b6e22976a797ca (commit)
       via  c84851bccc2e5e60536afa474a5f13134a3b79c9 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (d4182120a4d37d5652ca304c9ea9c2b912bacd98)
             N -- N -- N (06a64d7db2f93a996a074cfb9e1a8eacd3303eee)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit 06a64d7db2f93a996a074cfb9e1a8eacd3303eee
Author: Jacob Erlbeck <jerlbeck at>
Date:   Thu Oct 29 00:55:58 2015 +0100

    stats: Add osmo_ name prefix to identifiers
    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

commit bc4f7ae512b32fa4b569dfc5242d0b7a5da3f81b
Author: Jacob Erlbeck <jerlbeck at>
Date:   Wed Oct 28 21:47:45 2015 +0100

    stats: Add log reporter
    This reporter passes the measurement values to the logging subsystem
    as DSTATS (which is currently DLGLOBAL) level INFO messages.
    Sponsored-by: On-Waves ehf

commit 490b38f57a24726f3e3493fc3500cda526c5d0aa
Author: Jacob Erlbeck <jerlbeck at>
Date:   Tue Oct 27 15:10:28 2015 +0100

    stats: Use function pointers in reporter objects
    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

commit ed197fd4f923512fca5b93b90c2132845896fa59
Author: Jacob Erlbeck <jerlbeck at>
Date:   Tue Oct 27 14:43:24 2015 +0100

    stats: Make net config optional
    To support reporters without network configuration, this commit
    introduces the have_net_config flag to provide corresponding error
    Sponsored-by: On-Waves ehf

commit 4aa11770622ae9009074d68cc8c340821b19adf3
Author: Jacob Erlbeck <jerlbeck at>
Date:   Tue Oct 27 11:55:20 2015 +0100

    stats: Add missing mtu command to 'write' output
    Currently the config_write_stats_reporter function does not output
    the mtu value, which is fixed by this commit.
    Sponsored-by: On-Waves ehf

commit d01acfcc75a6c5798a95a8ccca9be18eba65a0bf
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 26 16:22:45 2015 +0100

    stats: Support statsd Multi-Metric Packets
    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

commit c8f47b600f8e2ad21266d4c27e960e477e5fe35c
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 26 14:42:05 2015 +0100

    stats: Add support for osmo_counters
    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
    Sponsored-by: On-Waves ehf

commit 80db4ec3875b0de7f06de769881d6c5d4b713f2d
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 26 14:39:08 2015 +0100

    core: Add difference function to osmo_counter
    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

commit c27671c10935ee384d03a87170c3f31ab435da07
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 26 12:32:07 2015 +0100

    stats: Report stat item values
    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

commit b1dbfb4c4179a62cd4b761ebdc7a3c2de5bdc0d9
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 26 11:58:38 2015 +0100

    stats: Implement timer based reporting
    This calls stats_flush in regular intervals which polls the
    statistical values and calls the active reporters when values have
    Sponsored-by: On-Waves ehf

commit adc900e0e38373193c8451c0310fe742d62c2c8e
Author: Jacob Erlbeck <jerlbeck at>
Date:   Tue Oct 20 19:05:52 2015 +0200

    stats/vty: Add stats configuration
    This commit provides stats configuration similar to the log
    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

commit 95bf828003b065f00a78144296072a9730cbf7bc
Author: Jacob Erlbeck <jerlbeck at>
Date:   Tue Oct 20 19:05:52 2015 +0200

    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

commit 45513e6040195f5494d40a2750de4dac7037593f
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 19 15:14:13 2015 +0200

    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
    Sponsored-by: On-Waves ehf

commit 7211fe157e1107d4a9c04a0ecf494a7b9633c400
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 19 15:11:50 2015 +0200

    stat/vty: Add vty_out_statistics_full to show all statistics
    This functions shows the state of all osmo_counters, stat_item
    groups, and counter groups.
    Sponsored-by: On-Waves ehf

commit aec583f68786f91c3f0d76a8f8706c85aaca07a8
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 19 15:06:01 2015 +0200

    stat/vty: Use the iterator algorithms to show ctrg and statg
    Currently the groups for stat_items and counter are iterated
    This commit makes use of the new iterator functions to access the
    single elements via handlers.
    Sponsored-by: On-Waves ehf

commit e5b0fe2e3c84dd0de7021d65d416356612db4260
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 19 15:00:59 2015 +0200

    core: Update osmo_counters_for_each doc
    Fix type and add a note about the semantics of the handler's return
    Sponsored-by: On-Waves ehf

commit c6a7108828bf98ebcaf31d24bd8d789afdd4da94
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 19 14:04:38 2015 +0200

    stats: Add stat_item_for_each functions
    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
    Sponsored-by: On-Waves ehf

commit 423c1e5a4fc7ad2cd5e95e852b778c7e2c892bc1
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 19 13:45:42 2015 +0200

    core: Extend rate_ctr by helper functions
    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
    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

commit b27b352e937dd0760da1e7fb05f9207be05702b8
Author: Jacob Erlbeck <jerlbeck at>
Date:   Mon Oct 12 18:47:09 2015 +0200

    stats: Use a global index for stat item values
    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
    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

commit 0a1400fc8311268d0a66bb20e0620e546e8d11c8
Author: Jacob Erlbeck <jerlbeck at>
Date:   Tue Oct 6 15:23:25 2015 +0200

    ns: Add statistics for some events
    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

commit 738d9e22108a8e472458fad42509fd8d96994d6c
Author: Jacob Erlbeck <jerlbeck at>
Date:   Tue Oct 6 15:21:56 2015 +0200

    stats: Add vty_out_stat_item_group
    This functions dumps a whole stat item group to the VTY.
    Sponsored-by: On-Waves ehf

commit 9732cb4a92a883c7e9f7dcd928b6e22976a797ca
Author: Jacob Erlbeck <jerlbeck at>
Date:   Thu Oct 1 20:43:53 2015 +0200

    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


Summary of changes:
 TODO-RELEASE                        |   1 +
 include/osmocom/core/bitXXgen.h.tpl |   4 +-
 include/osmocom/core/linuxlist.h    |   3 +-
 include/osmocom/core/stat_item.h    |  68 ++++----
 include/osmocom/core/stats.h        |  57 ++++---
 include/osmocom/gprs/gprs_ns.h      |   2 +-
 include/osmocom/vty/misc.h          |   2 +-
 include/osmocom/vty/stats.h         |   3 +-
 src/gb/gprs_ns.c                    |   8 +-
 src/stat_item.c                     |  62 +++----
 src/stats.c                         | 319 ++++++++++++++++++++++--------------
 src/vty/stats_vty.c                 | 140 +++++++++++-----
 src/vty/utils.c                     |  16 +-
 tests/stats/stats_test.c            | 110 ++++++-------
 14 files changed, 473 insertions(+), 322 deletions(-)

An utility library for Open Source Mobile Communications

More information about the osmocom-commitlog mailing list