Skip to contentSkip to conversation

master - dmstats: add libdm-stats library and 'dmsetup stats' command

PATCH Bryn Reeves 1 participant 1 message Aug 9, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d62a8d2f1535468c75379b877844bdb7666c8c9e
Commit:        d62a8d2f1535468c75379b877844bdb7666c8c9e
Parent:        f06d866110938458ed736f927e859534c99c295e
Author:        Bryn M. Reeves <[email protected]>
AuthorDate:    Wed Aug 5 10:40:00 2015 +0100
Committer:     Bryn M. Reeves <[email protected]>
CommitterDate: Sun Aug 9 14:37:58 2015 +0100

dmstats: add libdm-stats library and 'dmsetup stats' command

Add the libdm-stats module to libdm: this implements a simple interface for creating, managing and interrogating I/O statistics regions and areas on device-mapper devices.

The library interface is documented in libdevmapper.h and provides a 'dm_stats' handle that is used to perform statistics operations and obtain data.

Public methods are provided to create and destroy handles and to list, create, and destroy statistics regions as well as to obtain and parse counter data and calculate rate-based metrics.

This commit also adds a 'dmsetup stats' (aka 'dmstats') command with 'clear', 'create', 'delete', 'list', 'print', and 'report' sub-commands.

See the library documentation and the dmstats.8 manual page for detailed API and command descriptions.

---
 WHATS_NEW_DM                        |   14 +
 libdm/.exported_symbols.DM_1_02_104 |   68 ++
 libdm/Makefile.in                   |    1 +
 libdm/libdevmapper.h                |  643 +++++++++++
 libdm/libdm-stats.c                 | 1360 +++++++++++++++++++++++
 man/Makefile.in                     |    2 +-
 man/dmstats.8.in                    |  693 ++++++++++++
 tools/dmsetup.c                     | 2062 ++++++++++++++++++++++++++++++-----
 8 files changed, 4597 insertions(+), 246 deletions(-)
WHATS_NEW_DM +14 -0
index 598a354..1753322 100644
@@ -1,5 +1,19 @@
 Version 1.02.104 -
 =================================
+  Add dmstats.8 man page
+  Add report stats sub-command to provide repeating stats reports.
+  Add clear, delete, list, and print stats sub-commands.
+  Add --segments switch to create one region per device segment.
+  Add create stats sub-command and --start, --length, --areas and --areasize.
+  Recognize 'dmstats' as an alias for 'dmsetup stats' when run with this name.
+  Add a 'stats' command to dmsetup to configure, manage and report stats data.
+  Add --regionid, --allregions to specify a single stats region or all regions.
+  Add --allprograms for stats commands that filter by program ID.
+  Add --auxdata and --programid arguments to specify aux data and program ID.
+  Add statistics fields to -o <field>
+  Add libdm-stats library to allow management of device-mapper statistics.
+  Add --nosuffix to suppress unit suffixes in report output.
+  Add --units to control report field output units.
   Add support to redisplay column headings for repeating column reports.
   Fix report header and row resource leaks.
   Report timestamps of ioctls with dmsetup -vvv.
libdm/.exported_symbols.DM_1_02_104 +68 -0

73 lines not on this page · raw message

libdm/Makefile.in +1 -0
index 73f6f40..880b40c 100644
@@ -26,6 +26,7 @@ SOURCES =\
 	libdm-string.c \
 	libdm-report.c \
 	libdm-timestamp.c \
+	libdm-stats.c \
 	libdm-config.c \
 	mm/dbg_malloc.c \
 	mm/pool.c \
libdm/libdevmapper.h +643 -0

655 lines not on this page · raw message

libdm/libdm-stats.c new file +1360 -0

1,360 lines not on this page · raw message

man/Makefile.in +1 -1
index 0eca987..dc16a76 100644
@@ -83,7 +83,7 @@ ifneq ("@THIN@", "none")
   MAN7+=lvmthin.7
 endif
 
-MAN8DM=dmsetup.8 $(DMEVENTDMAN) $(BLKDEACTIVATEMAN)
+MAN8DM=dmsetup.8 dmstats.8 $(DMEVENTDMAN) $(BLKDEACTIVATEMAN)
 MAN5DIR=$(mandir)/man5
 MAN7DIR=$(mandir)/man7
 MAN8DIR=$(mandir)/man8
man/dmstats.8.in new file +693 -0

693 lines not on this page · raw message

tools/dmsetup.c +1817 -245

185 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.