xref: /aosp_15_r20/external/bcc/tools/biopattern_example.txt (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1Demonstrations of biopattern, the Linux eBPF/bcc version.
2
3
4biopattern identifies random/sequential disk access patterns. Example:
5
6# ./biopattern.py
7TIME      DISK     %RND  %SEQ    COUNT     KBYTES
822:03:51  vdb         0    99      788       3184
922:03:51  Unknown     0   100        4          0
1022:03:51  vda        85    14       21        488
11[...]
12
13
14The -d option only print the matched disk.
15
16# ./biopattern.py -d vdb 1 10
17TIME      DISK     %RND  %SEQ    COUNT     KBYTES
1822:12:57  vdb         0    99      193        772
1922:12:58  vdb         0   100     1119       4476
2022:12:59  vdb         0   100     1126       4504
2122:13:00  vdb         0   100     1009       4036
2222:13:01  vdb         0   100      958       3832
2322:13:02  vdb         0    99      957       3856
2422:13:03  vdb         0   100     1130       4520
2522:13:04  vdb         0   100     1051       4204
2622:13:05  vdb         0   100     1158       4632
27[...]
28
29
30USAGE message:
31
32Show block device I/O pattern.
33
34positional arguments:
35  interval              Output interval in seconds
36  count                 Number of outputs
37
38optional arguments:
39  -h, --help            show this help message and exit
40  -d DISK, --disk DISK  Trace this disk only
41
42examples:
43    ./biopattern            # show block device I/O pattern.
44    ./biopattern 1 10       # print 1 second summaries, 10 times
45    ./biopattern -d sdb     # show sdb only
46