master - libdm: add statistics groups
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=abb499c1c2e2928b66ddcb1eab9044b0483daf31 Commit: abb499c1c2e2928b66ddcb1eab9044b0483daf31 Parent: 728949c7bb2ad9151b31a8d7001fb4358deeb170 Author: Bryn M. Reeves <[email protected]> AuthorDate: Mon Feb 29 17:52:29 2016 +0000 Committer: Bryn M. Reeves <[email protected]> CommitterDate: Tue Jul 5 19:29:50 2016 +0100
libdm: add statistics groups
Add a grouping facility to the libdm-stats library that allows the user to bind several regions together as a group. Groups may be used to aggregate data from several regions for reporting, or to select and sort among large sets of regions.
A textual descriptor ("group tag") is associated with each group and is stored in the first group member's aux_data field. The tag contains the group member list and an optional alias for the group, allowing the user to assign meaningful names to groups of regions.
These descriptors are parsed in @stats_list message responses and populate the resulting region and area tables with the group structure.
Groups with overlapping regions are permitted but since this will result in some events being counted more than once a warning is printed in this case.
Nested and overlapping groups are not currently supported and attempting to create these configurations results in error.
--- WHATS_NEW_DM | 5 + libdm/.exported_symbols.DM_1_02_129 | 8 + libdm/libdevmapper.h | 74 +++ libdm/libdm-stats.c | 880 ++++++++++++++++++++++++++++++++++- 4 files changed, 953 insertions(+), 14 deletions(-)
WHATS_NEW_DM +5 -0
@@ -1,5 +1,10 @@ Version 1.02.129 - ================================= + Add dm_stats_get_group_descriptor() to return the member list as a string. + Add dm_stats_get_nr_groups() and dm_stats_group_present(). + Add dm_stats_{get,set}_alias() to set and retrieve alias names for groups. + Add dm_stats_get_group_id() to return the group ID for a given region. + Add dm_stats_{create,delete}_group() to allow grouping of stats regions. Add enum-driven dm_stats_get_{metric,counter}() interfaces. Add dm_bitset_parse_list() to parse a string representation of a bitset. Thin dmeventd plugin umounts lvm2 volume only when pool is 95% or more.
libdm/.exported_symbols.DM_1_02_129 +8 -0
@@ -1,3 +1,11 @@ dm_bitset_parse_list +dm_stats_create_group +dm_stats_delete_group +dm_stats_get_alias dm_stats_get_counter +dm_stats_get_group_descriptor +dm_stats_get_group_id dm_stats_get_metric +dm_stats_get_nr_groups +dm_stats_group_present +dm_stats_set_alias
libdm/libdevmapper.h +74 -0
92 lines not on this page · raw message
libdm/libdm-stats.c +866 -14
1,139 lines not on this page · raw message