|
| 1 | +Demonstrations of biosnoop, the Linux BPF/bpftrace version. |
| 2 | + |
| 3 | + |
| 4 | +This traces block I/O, and shows the issuing process (at least, the process |
| 5 | +that was on-CPU at the time of queue insert) and the latency of the I/O: |
| 6 | + |
| 7 | +# ./biosnoop.bt |
| 8 | +Attaching 4 probes... |
| 9 | +TIME(ms) DISK COMM PID LAT(ms) |
| 10 | +611 nvme0n1 bash 4179 10 |
| 11 | +611 nvme0n1 cksum 4179 0 |
| 12 | +627 nvme0n1 cksum 4179 15 |
| 13 | +641 nvme0n1 cksum 4179 13 |
| 14 | +644 nvme0n1 cksum 4179 3 |
| 15 | +658 nvme0n1 cksum 4179 13 |
| 16 | +673 nvme0n1 cksum 4179 14 |
| 17 | +686 nvme0n1 cksum 4179 13 |
| 18 | +701 nvme0n1 cksum 4179 14 |
| 19 | +710 nvme0n1 cksum 4179 8 |
| 20 | +717 nvme0n1 cksum 4179 6 |
| 21 | +728 nvme0n1 cksum 4179 10 |
| 22 | +735 nvme0n1 cksum 4179 6 |
| 23 | +751 nvme0n1 cksum 4179 10 |
| 24 | +758 nvme0n1 cksum 4179 17 |
| 25 | +783 nvme0n1 cksum 4179 12 |
| 26 | +796 nvme0n1 cksum 4179 25 |
| 27 | +802 nvme0n1 cksum 4179 32 |
| 28 | +[...] |
| 29 | + |
| 30 | +This output shows the cksum process was issuing block I/O, which were |
| 31 | +completing with around 12 milliseconds of latency. Each block I/O event is |
| 32 | +printed out, with a completion time as the first column, measured from |
| 33 | +program start. |
| 34 | + |
| 35 | + |
| 36 | +An example of some background flushing: |
| 37 | + |
| 38 | +# ./biosnoop.bt |
| 39 | +Attaching 4 probes... |
| 40 | +TIME(ms) DISK COMM PID LAT(ms) |
| 41 | +2966 nvme0n1 jbd2/nvme0n1-8 615 0 |
| 42 | +2967 nvme0n1 jbd2/nvme0n1-8 615 0 |
| 43 | +[...] |
| 44 | + |
| 45 | + |
| 46 | +There is another version of this tool in bcc: https://github.com/iovisor/bcc |
| 47 | +The bcc version provides more fields. |
0 commit comments