Red Hat Bugzilla – Bug 1267664
add IO statistics reporting to dmsetup
Last modified: 2016-05-10 21:18:42 EDT
+++ This bug was initially created as a clone of Bug #1222101 +++ Description of problem: The kernel has supported configurable IO statistic for device-mapper devices since 3.11. Enabling and using them currently requires manual use of the device-mapper message facility and returns values in terms of diskstats-style counter sets. Adding statistics support to libdevmapper and dmsetup would simplify configuration, inspection and management of device-mapper IO statistics and provide common mechanisms for use in other device-mapper applications like lvm2 and multipath-tools. Version-Release number of selected component (if applicable): lvm2-2.02.118.el6 How reproducible: 100% Steps to Reproduce: 1. dmsetup --help Actual results: Np statistics commands. Additional info: dm-stats kernel interface: see Documentation/device-mapper/statistics.txt --- Additional comment from Peter Rajnoha on 2015-08-10 03:57:42 EDT --- New "dmstats" commands has been added in recent lvm2 v2.02.127 upstream which is going to be included in RHEL 7.2 device-mapper subpackage (device-mapper v 1.02.104, a subpackage of lvm2). See also man dmstats(8) for more info on usage.
Verified on: lvm2-2.02.140-1.el6. kernel-2.6.32-604.el6 # dmstats create --alldevices --precise vg_intelcanoepass01-lv_home: Created new region with 1 area(s) as region ID 0 vg_intelcanoepass01-lv_swap: Created new region with 1 area(s) as region ID 0 vg_intelcanoepass01-lv_root: Created new region with 1 area(s) as region ID 0 vgtest-lvtest: Created new region with 1 area(s) as region ID 0 # dmstats list -o +precise Name RgID RgSta RgSize #Areas ArSize ProgID Precise vg_intelcanoepass01-lv_home 0 0 1.30t 1 1.30t dmstats 1 vg_intelcanoepass01-lv_swap 0 0 15.69g 1 15.69g dmstats 1 vg_intelcanoepass01-lv_root 0 0 50.00g 1 50.00g dmstats 1 vgtest-lvtest 0 0 200.00m 1 200.00m dmstats 1 # dmstats create --start 10g --len 10g vgtest-lvtest vgtest-lvtest: Created new region with 1 area(s) as region ID 1 # dmstats create --precise --bounds 10ms,20ms,30ms vgtest-lvtest vgtest-lvtest: Created new region with 1 area(s) as region ID 2 # dmstats list --histogram Name RgID RgStar RgSize #Areas ArSize #Bins Histogram Bounds vg_intelcanoepass01-lv_home 0 0 1.30t 1 1.30t 0 vg_intelcanoepass01-lv_swap 0 0 15.69g 1 15.69g 0 vg_intelcanoepass01-lv_root 0 0 50.00g 1 50.00g 0 vgtest-lvtest 0 0 200.00m 1 200.00m 0 vgtest-lvtest 1 10.00g 10.00g 1 10.00g 0 vgtest-lvtest 2 0 200.00m 1 200.00m 4 0s,10ms,20ms,30ms # dmstats list -o +precise,hist_bins Name RgID RgStar RgSize #Areas ArSize ProgID Precise #Bins vg_intelcanoepass01-lv_home 0 0 1.30t 1 1.30t dmstats 1 0 vg_intelcanoepass01-lv_swap 0 0 15.69g 1 15.69g dmstats 1 0 vg_intelcanoepass01-lv_root 0 0 50.00g 1 50.00g dmstats 1 0 vgtest-lvtest 0 0 200.00m 1 200.00m dmstats 1 0 vgtest-lvtest 1 10.00g 10.00g 1 10.00g dmstats 0 0 vgtest-lvtest 2 0 200.00m 1 200.00m dmstats 1 4 # dmstats delete --regionid 1 vgtest-lvtest # # dmstats list --histogram Name RgID RgSta RgSize #Areas ArSize #Bins Histogram Bounds vg_intelcanoepass01-lv_home 0 0 1.30t 1 1.30t 0 vg_intelcanoepass01-lv_swap 0 0 15.69g 1 15.69g 0 vg_intelcanoepass01-lv_root 0 0 50.00g 1 50.00g 0 vgtest-lvtest 0 0 200.00m 1 200.00m 0 vgtest-lvtest 2 0 200.00m 1 200.00m 4 0s,10ms,20ms,30ms # dmstats delete --allregions vgtest-lvtest # # dmstats list --histogram Name RgID RgSta RgSize #Areas ArSize #Bins Histogram Bounds vg_intelcanoepass01-lv_home 0 0 1.30t 1 1.30t 0 vg_intelcanoepass01-lv_swap 0 0 15.69g 1 15.69g 0 vg_intelcanoepass01-lv_root 0 0 50.00g 1 50.00g 0 # dmstats delete --allregions --alldevices # # dmstats list --histogram #
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0964.html