blob: 9e69de9b1b8a3725ecd990e56d3351ce88d72397 [file] [log] [blame]
mcaleavya6959dcf2016-02-06 12:00:34 +00001Example of BCC tool bitesize.py
2
3The aim of this tool is to show I/O distribution for requested block sizes, by process name.
4
5# ./bitesize.py
6Tracing... Hit Ctrl-C to end.
7^C
8
9Process Name: = 'kworker/u128:1'
10 Kbytes : count distribution
11 0 -> 1 : 1 |******************** |
12 2 -> 3 : 0 | |
13 4 -> 7 : 2 |****************************************|
14
15Process Name: = 'bitesize.py'
16 Kbytes : count distribution
17 0 -> 1 : 0 | |
18 2 -> 3 : 0 | |
19 4 -> 7 : 0 | |
20 8 -> 15 : 0 | |
21 16 -> 31 : 0 | |
22 32 -> 63 : 0 | |
23 64 -> 127 : 0 | |
24 128 -> 255 : 1 |****************************************|
25
26Process Name: = 'dd'
27 Kbytes : count distribution
28 0 -> 1 : 3 | |
29 2 -> 3 : 0 | |
30 4 -> 7 : 6 | |
31 8 -> 15 : 0 | |
32 16 -> 31 : 1 | |
33 32 -> 63 : 1 | |
34 64 -> 127 : 0 | |
35 128 -> 255 : 0 | |
36 256 -> 511 : 1 | |
37 512 -> 1023 : 0 | |
38 1024 -> 2047 : 488 |****************************************|
39
40Process Name: = 'jbd2/dm-1-8'
41 Kbytes : count distribution
42 0 -> 1 : 0 | |
43 2 -> 3 : 0 | |
44 4 -> 7 : 1 |****************************************|
45
46Process Name: = 'cat'
47 Kbytes : count distribution
48 0 -> 1 : 1 | |
49 2 -> 3 : 0 | |
50 4 -> 7 : 0 | |
51 8 -> 15 : 0 | |
52 16 -> 31 : 0 | |
53 32 -> 63 : 1 | |
54 64 -> 127 : 0 | |
55 128 -> 255 : 0 | |
56 256 -> 511 : 1924 |****************************************|
57
58Process Name: = 'ntpd'
59 Kbytes : count distribution
60 0 -> 1 : 0 | |
61 2 -> 3 : 0 | |
62 4 -> 7 : 104 |****************************************|
63
64Process Name: = 'vmtoolsd'
65 Kbytes : count distribution
66 0 -> 1 : 0 | |
67 2 -> 3 : 0 | |
68 4 -> 7 : 1 |****************************************|
69
70Process Name: = 'bash'
71 Kbytes : count distribution
72 0 -> 1 : 0 | |
73 2 -> 3 : 0 | |
74 4 -> 7 : 0 | |
75 8 -> 15 : 0 | |
76 16 -> 31 : 2 |****************************************|
77
78Process Name: = 'jbd2/sdb-8'
79 Kbytes : count distribution
80 0 -> 1 : 0 | |
81 2 -> 3 : 0 | |
82 4 -> 7 : 1 |****************************************|
83 8 -> 15 : 0 | |
84 16 -> 31 : 0 | |
85 32 -> 63 : 1 |****************************************|
86
87We can see from above that there was a dd command being run which generated 488 IOPS between 1MB and 2MB, we can also see the
88cat command generating 1924 IOPS between 256Kb and 512Kb.
89
90
91See also systemtap version:
92https://github.com/brendangregg/systemtap-lwtools/blob/master/disk/bitesize-nd.stp