From 624f86a469b3825bfa687384a46570dab6b46170 Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Tue, 6 Aug 2013 15:15:19 -0400 Subject: [PATCH 15/16] dm stats: cleaned up formatting of docs for messages Much easier to read now. --- Documentation/device-mapper/dm-statistics.txt | 156 +++++++++++++------------ 1 files changed, 80 insertions(+), 76 deletions(-) diff --git a/Documentation/device-mapper/dm-statistics.txt b/Documentation/device-mapper/dm-statistics.txt index 3ec2584..aca6f2c 100644 --- a/Documentation/device-mapper/dm-statistics.txt +++ b/Documentation/device-mapper/dm-statistics.txt @@ -17,82 +17,86 @@ and process statistics without stepping over each other's data. Messages ======== -@stats_create [ []] - - "-" - 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_create message creates new region and returns the region id. - -@stats_clear - - region id returned from @stats_create -Clears all the counters except the in-flight i/o counters. - -@stats_print [ ] - - 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. -@stats_print message returns statistics, each area is represented by one -line in this form: -- 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 [ ] - - 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. -@stats_print_clear atomically prints the counters (like @stats_print) -and clears 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). If and - are specified, only the statistics on the lines that -were returned are cleared. - -@stats_delete - - region id returned from @stats_create -Deletes the region with the specified id. - -@stats_list [] -Lists all regions registered with @stats_create. - - An optional parameter specifying the program that queries the - parameters. If this parameter is specified, only regions - belonging to this program are returned. If it is not specified, - all regions are returned. -Output format: -: - - -Example -======= + @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: -- 1.7.1