60 lines
2.9 KiB
Plaintext
60 lines
2.9 KiB
Plaintext
Demonstrations of bitesize, the Linux bpftrace/eBPF version.
|
|
|
|
|
|
This traces disk I/O via the block I/O interface, and prints a summary of I/O
|
|
sizes as histograms for each process name. For example:
|
|
|
|
# ./bitesize.bt
|
|
Attaching 3 probes...
|
|
Tracing block device I/O... Hit Ctrl-C to end.
|
|
^C
|
|
I/O size (bytes) histograms by process name:
|
|
|
|
@[cleanup]:
|
|
[4K, 8K) 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
|
|
|
|
@[postdrop]:
|
|
[4K, 8K) 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
|
|
|
|
@[jps]:
|
|
[4K, 8K) 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
|
[8K, 16K) 0 | |
|
|
[16K, 32K) 0 | |
|
|
[32K, 64K) 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
|
|
|
|
@[kworker/2:1H]:
|
|
[0] 3 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
|
|
[1] 0 | |
|
|
[2, 4) 0 | |
|
|
[4, 8) 0 | |
|
|
[8, 16) 0 | |
|
|
[16, 32) 0 | |
|
|
[32, 64) 0 | |
|
|
[64, 128) 0 | |
|
|
[128, 256) 0 | |
|
|
[256, 512) 0 | |
|
|
[512, 1K) 0 | |
|
|
[1K, 2K) 0 | |
|
|
[2K, 4K) 0 | |
|
|
[4K, 8K) 0 | |
|
|
[8K, 16K) 0 | |
|
|
[16K, 32K) 0 | |
|
|
[32K, 64K) 0 | |
|
|
[64K, 128K) 1 |@@@@@@@@@@@@@@@@@ |
|
|
|
|
@[jbd2/nvme0n1-8]:
|
|
[4K, 8K) 3 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
|
|
[8K, 16K) 0 | |
|
|
[16K, 32K) 0 | |
|
|
[32K, 64K) 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
|
[64K, 128K) 1 |@@@@@@@@@@@@@@@@@ |
|
|
|
|
@[dd]:
|
|
[16K, 32K) 921 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
|
|
|
|
The most active process while tracing was "dd", which issues 921 I/O between
|
|
16 Kbytes and 32 Kbytes in size.
|
|
|
|
|
|
There is another version of this tool in bcc: https://github.com/iovisor/bcc
|