summaryrefslogtreecommitdiffstats
path: root/Documentation/device-mapper/statistics.txt
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2015-06-09 17:21:39 -0400
committerMike Snitzer <snitzer@redhat.com>2015-06-17 12:40:40 -0400
commitc96aec344de0de857ef3d7fba53992c7ba311e1e (patch)
tree09b6b651366fd853dc4c73a97ee0598865bd4e06 /Documentation/device-mapper/statistics.txt
parentdd4c1b7d0c95be1c9245118a3accc41a16f1db67 (diff)
dm stats: support precise timestamps
Make it possible to use precise timestamps with nanosecond granularity in dm statistics. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'Documentation/device-mapper/statistics.txt')
-rw-r--r--Documentation/device-mapper/statistics.txt28
1 files changed, 24 insertions, 4 deletions
diff --git a/Documentation/device-mapper/statistics.txt b/Documentation/device-mapper/statistics.txt
index 2a1673adc200..ff6baeaa71f7 100644
--- a/Documentation/device-mapper/statistics.txt
+++ b/Documentation/device-mapper/statistics.txt
@@ -13,9 +13,13 @@ the range specified.
13The I/O statistics counters for each step-sized area of a region are 13The I/O statistics counters for each step-sized area of a region are
14in the same format as /sys/block/*/stat or /proc/diskstats (see: 14in the same format as /sys/block/*/stat or /proc/diskstats (see:
15Documentation/iostats.txt). But two extra counters (12 and 13) are 15Documentation/iostats.txt). But two extra counters (12 and 13) are
16provided: total time spent reading and writing in milliseconds. All 16provided: total time spent reading and writing. All these counters may
17these counters may be accessed by sending the @stats_print message to 17be accessed by sending the @stats_print message to the appropriate DM
18the appropriate DM device via dmsetup. 18device via dmsetup.
19
20The reported times are in milliseconds and the granularity depends on
21the kernel ticks. When the option precise_timestamps is used, the
22reported times are in nanoseconds.
19 23
20Each region has a corresponding unique identifier, which we call a 24Each region has a corresponding unique identifier, which we call a
21region_id, that is assigned when the region is created. The region_id 25region_id, that is assigned when the region is created. The region_id
@@ -33,7 +37,9 @@ memory is used by reading
33Messages 37Messages
34======== 38========
35 39
36 @stats_create <range> <step> [<program_id> [<aux_data>]] 40 @stats_create <range> <step>
41 [<number_of_optional_arguments> <optional_arguments>...]
42 [<program_id> [<aux_data>]]
37 43
38 Create a new region and return the region_id. 44 Create a new region and return the region_id.
39 45
@@ -48,6 +54,17 @@ Messages
48 "/<number_of_areas>" - the range is subdivided into the specified 54 "/<number_of_areas>" - the range is subdivided into the specified
49 number of areas. 55 number of areas.
50 56
57 <number_of_optional_arguments>
58 The number of optional arguments
59
60 <optional_arguments>
61 The following optional arguments are supported
62 precise_timestamps - use precise timer with nanosecond resolution
63 instead of the "jiffies" variable. When this argument is
64 used, the resulting times are in nanoseconds instead of
65 milliseconds. Precise timestamps are a little bit slower
66 to obtain than jiffies-based timestamps.
67
51 <program_id> 68 <program_id>
52 An optional parameter. A name that uniquely identifies 69 An optional parameter. A name that uniquely identifies
53 the userspace owner of the range. This groups ranges together 70 the userspace owner of the range. This groups ranges together
@@ -55,6 +72,9 @@ Messages
55 created and ignore those created by others. 72 created and ignore those created by others.
56 The kernel returns this string back in the output of 73 The kernel returns this string back in the output of
57 @stats_list message, but it doesn't use it for anything else. 74 @stats_list message, but it doesn't use it for anything else.
75 If we omit the number of optional arguments, program id must not
76 be a number, otherwise it would be interpreted as the number of
77 optional arguments.
58 78
59 <aux_data> 79 <aux_data>
60 An optional parameter. A word that provides auxiliary data 80 An optional parameter. A word that provides auxiliary data