From f7b3237cb3a9d1d2124d77b5e6efe1f78a4e82c4 Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Tue, 6 Aug 2013 15:16:46 -0400 Subject: [PATCH 16/16] dm stats: rename dm-statistics.txt to statistics.txt --- Documentation/device-mapper/dm-statistics.txt | 109 ------------------------- Documentation/device-mapper/statistics.txt | 109 +++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 109 deletions(-) delete mode 100644 Documentation/device-mapper/dm-statistics.txt create mode 100644 Documentation/device-mapper/statistics.txt diff --git a/Documentation/device-mapper/dm-statistics.txt b/Documentation/device-mapper/dm-statistics.txt deleted file mode 100644 index aca6f2c..0000000 --- a/Documentation/device-mapper/dm-statistics.txt +++ /dev/null @@ -1,109 +0,0 @@ -dm statistics -============= - -Device mapper can calculate I/O statistics on various regions of the -device. - -Each region specifies a starting sector, ending sector and step. -Individual statistics will be collected for each step-sized area between -starting and ending sector. - -Each region is identified by a region id, it is integer number that is -uniquely assigned when creating the region. The region number must be -supplied when querying statistics about the region or deleting the -region. Unique region ids enable multiple userspace programs to request -and process statistics without stepping over each other's data. - -Messages -======== - - @stats_create [ []] - - Create a new region and return the region id. - - "-" - whole device - "-" - a specified range in 512-byte sectors - - "" - the number of sectors in each area - "/" - the range is subdivided into the specified - number of areas - - An optional parameter. The string that identifies a program - that created this range. The kernel returns this string back - in the output of @stats_list command, but it doesn't use this - value for anything. - - An optional parameter. The string that identifies parameters - for a program that created this range. The kernel returns this - string back in the output of @stats_list command, but it - doesn't use this value for anything. - - @stats_clear - - Clear all the counters except the in-flight i/o counters. - - region id returned from @stats_create - - @stats_print [ ] - - Print counters for each area of a region. - - region id returned from @stats_create - - The index of the starting line in the output. If omitted, all - lines are returned. - - The number of lines in the output. If omitted, all lines are - returned. - Output format for each area of a region: - - counters - The first 11 counters have the same meaning as - /sys/block/*/stat or /proc/diskstats. - Additional counters: - 12. the total time spent reading in milliseconds - 13. the total time spent writing in milliseconds - - @stats_print_clear [ ] - - Atomically print the counters (like @stats_print) and clear all - the counters except the in-flight i/o counters. Useful when - client consuming the statistics does not want to lose any - statistics (between printing and clearing). - - region id returned from @stats_create - - The index of the starting line in the output. If omitted, all - lines are returned/cleared. - - The number of lines in the output. If omitted, all lines are - returned/cleared. - - @stats_delete - - Delete the region with the specified id. - - region id returned from @stats_create - - @stats_list [] - - List all regions registered with @stats_create. - - An optional parameter specifying the program that queries the - parameters. If this parameter is specified, only region - belonging to this program are returned. If it is not - specified, all regions are returned. - Output format: - : - - -Examples -======== - -Subdivide the DM device 'vol' into 100 pieces and start collecting -statistics on them: -dmsetup message vol 0 @stats_create - /100 - -Print the statistics: -dmsetup message vol 0 @stats_print 0 - -Delete the statistics: -dmsetup message vol 0 @stats_delete 0 diff --git a/Documentation/device-mapper/statistics.txt b/Documentation/device-mapper/statistics.txt new file mode 100644 index 0000000..aca6f2c --- /dev/null +++ b/Documentation/device-mapper/statistics.txt @@ -0,0 +1,109 @@ +dm statistics +============= + +Device mapper can calculate I/O statistics on various regions of the +device. + +Each region specifies a starting sector, ending sector and step. +Individual statistics will be collected for each step-sized area between +starting and ending sector. + +Each region is identified by a region id, it is integer number that is +uniquely assigned when creating the region. The region number must be +supplied when querying statistics about the region or deleting the +region. Unique region ids enable multiple userspace programs to request +and process statistics without stepping over each other's data. + +Messages +======== + + @stats_create [ []] + + Create a new region and return the region id. + + "-" - whole device + "-" - a specified range in 512-byte sectors + + "" - the number of sectors in each area + "/" - the range is subdivided into the specified + number of areas + + An optional parameter. The string that identifies a program + that created this range. The kernel returns this string back + in the output of @stats_list command, but it doesn't use this + value for anything. + + An optional parameter. The string that identifies parameters + for a program that created this range. The kernel returns this + string back in the output of @stats_list command, but it + doesn't use this value for anything. + + @stats_clear + + Clear all the counters except the in-flight i/o counters. + + region id returned from @stats_create + + @stats_print [ ] + + Print counters for each area of a region. + + region id returned from @stats_create + + The index of the starting line in the output. If omitted, all + lines are returned. + + The number of lines in the output. If omitted, all lines are + returned. + Output format for each area of a region: + - counters + The first 11 counters have the same meaning as + /sys/block/*/stat or /proc/diskstats. + Additional counters: + 12. the total time spent reading in milliseconds + 13. the total time spent writing in milliseconds + + @stats_print_clear [ ] + + Atomically print the counters (like @stats_print) and clear all + the counters except the in-flight i/o counters. Useful when + client consuming the statistics does not want to lose any + statistics (between printing and clearing). + + region id returned from @stats_create + + The index of the starting line in the output. If omitted, all + lines are returned/cleared. + + The number of lines in the output. If omitted, all lines are + returned/cleared. + + @stats_delete + + Delete the region with the specified id. + + region id returned from @stats_create + + @stats_list [] + + List all regions registered with @stats_create. + + An optional parameter specifying the program that queries the + parameters. If this parameter is specified, only region + belonging to this program are returned. If it is not + specified, all regions are returned. + Output format: + : - + +Examples +======== + +Subdivide the DM device 'vol' into 100 pieces and start collecting +statistics on them: +dmsetup message vol 0 @stats_create - /100 + +Print the statistics: +dmsetup message vol 0 @stats_print 0 + +Delete the statistics: +dmsetup message vol 0 @stats_delete 0 -- 1.7.1