Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

9.5 Optional Exercises

If not specified, these can be completed using either bpftrace or BCC:

  1. Modify biolatency(8) to print a linear histogram instead, for the range 0 to 100 milliseconds and a step size of one millisecond.

  2. Modify biolatency(8) to print the linear histogram summary every one second.

  3. Develop a tool to show disk I/O completions by CPU, to check how these interrupts are balanced. It could be displayed as a linear histogram.

  4. Develop a tool similar to biosnoop(8) to print per-event block I/O, with only the following fields, in CSV format: completion_time,direction,latency_ms. The direction is read or write.

  5. Save two minutes of (4) and use plotting software to visualize it as a scatter plot, coloring reads red and writes blue.

  6. Save two minutes of the output of (2) and use plotting software to display it as a latency heat map. (You can also develop some plotting software: e.g., use awk(1) to turn the count column into rows of a HTML table, with the background color scaled to the value.)

  7. Rewrite biosnoop(8) to use block tracepoints.

  8. Modify seeksize(8) to show the actual seek distances encountered by the storage devices: measured on completions.

  9. Write a tool to show disk I/O timeouts. One solution could be to use the block tracepoints and BLK_STS_TIMEOUT (see bioerr(8)).

  10. (Advanced, unsolved) Develop a tool that shows the lengths of block I/O merging as a histogram.

  • + Share This
  • 🔖 Save To Your Account