Create a whole-device region with one area on vg00/lvol1
# dmstats create vg00/lvol1
vg00/lvol1: Created new region with 1 area(s) as region ID 0
Create a 32M region 1G into device d0
# dmstats create --start 1G --length 32M d0
d0: Created new region with 1 area(s) as region ID 0
Create a whole-device region with 8 areas on every device
# dmstats create --areas 8
vg00-lvol1: Created new region with 8 area(s) as region ID 0
vg00-lvol2: Created new region with 8 area(s) as region ID 0
vg00-lvol3: Created new region with 8 area(s) as region ID 0
vg01-lvol0: Created new region with 8 area(s) as region ID 2
vg01-lvol1: Created new region with 8 area(s) as region ID 0
vg00-lvol2: Created new region with 8 area(s) as region ID 1
Delete all regions on all devices
# dmstats delete --alldevices --allregions
Create a whole-device region with areas 10GiB in size on
vg00/lvol1 using dmsetup
# dmsetup stats create --areasize 10G vg00/lvol1
vg00-lvol1: Created new region with 5 area(s) as region ID 1
Create a 1GiB region with 16 areas at the start of vg00/lvol1
# dmstats create --start 0 --len 1G --areas=16 vg00/lvol1
vg00-lvol1: Created new region with 16 area(s) as region ID 0
List the statistics regions registered on vg00/lvol1
# dmstats list vg00/lvol1
Name RgID RStart RSize #Areas ASize ProgID
vg00-lvol1 0 0 61.00g 1 61.00g dmstats
vg00-lvol1 1 61.00g 19.20g 1 19.20g dmstats
vg00-lvol1 2 80.20g 2.14g 1 2.14g dmstats
Display five statistics reports for vg00/lvol1 at an interval of
one second
# dmstats report --interval 1 --count 5 vg00/lvol1
# dmstats report
Name RgID ArID AStart ASize RRqM/s WRqM/s R/s
W/s RSz/s WSz/s AvRqSz QSize Util% AWait RdAWa WrAWa
vg_hex-lv_home 0 0 0 61.00g 0.00 0.00
0.00 218.00 0 1.04m 4.50k 2.97 81.70 13.62 0.00
13.62
vg_hex-lv_home 1 0 61.00g 19.20g 0.00 0.00
0.00 5.00 0 548.00k 109.50k 0.14 11.00 27.40 0.00
27.40
vg_hex-lv_home 2 0 80.20g 2.14g 0.00 0.00
0.00 14.00 0 1.15m 84.00k 0.39 18.70 27.71 0.00
27.71
Create one region for reach target contained in device vg00/lvol1
# dmstats create --segments vg00/lvol1
vg00-lvol1: Created new region with 1 area(s) as region ID 0
vg00-lvol1: Created new region with 1 area(s) as region ID 1
vg00-lvol1: Created new region with 1 area(s) as region ID 2
Create regions mapping each file in the directory images/ and
place them into separate groups, each named after the
corresponding file
# dmstats create --filemap images/*
images/vm1.qcow2: Created new group with 87 region(s) as group ID
0.
images/vm1-1.qcow2: Created new group with 8 region(s) as group
ID 87.
images/vm2.qcow2: Created new group with 11 region(s) as group ID
95.
images/vm2-1.qcow2: Created new group with 1454 region(s) as
group ID 106.
images/vm3.img: Created new group with 2 region(s) as group ID
1560.
Print raw counters for region 4 on device d0
# dmstats print --regionid 4 d0
2097152+65536 0 0 0 0 29 0 264 701 0 41 701 0 41