Skip to main content
Version: v0.58.0

top_blockio

The top_blockio gadget provides a periodic list of input/output block device activity. This gadget requires Linux Kernel Version 6.5+.

Note: If you have an encrypted disk some block IO operations will not be shown, since device mappers are in between these operations to operate transparently. See https://docs.kernel.org/admin-guide/device-mapper/dm-crypt.html

Requirements​

  • Minimum Kernel Version : 6.6

Getting started​

Running the gadget:

$ kubectl gadget run ghcr.io/inspektor-gadget/gadget/top_blockio:v0.58.0

Guide​

Run a pod / container:

$ kubectl run --restart=Never --image=busybox test-top-blockio -- sh -c 'while true; do dd if=/dev/zero of=/tmp/test count=4096; sync; sleep 0.2; done'
pod/test-top-blockio created

Then, run the gadget and see how it shows the sync process:

$ kubectl gadget run top_blockio:v0.58.0
K8S.NODE K8S.NAMESPACE K8S.PODNAME K8S.CONTAINERNAME PID RW MAJOR MINOR COMM BYTES US IO
minikube default test-top-blockio test-top-blockio 8086 wr… 8 0 sync 81920 45 1
minikube default test-top-blockio test-top-blockio 8055 wr… 8 0 sync 606208 547 3
minikube default test-top-blockio test-top-blockio 8082 wr… 8 0 sync 65536 95 2
minikube default test-top-blockio test-top-blockio 8084 wr… 8 0 sync 147456 95 2
...

Finally, clean the system:

$ kubectl delete pod test-top-blockio