Now that you have understood sufficient details about IRQs and interrupt handling, we can (finally!) leverage the kernel's proc filesystem so that we can peek at the currently allocated IRQs. We can do this by reading the content of the /proc/interrupts pseudofile. We'll show a couple of screenshots: the first (Figure 4.8) shows the IRQ status – the number of interrupts serviced per CPU per I/O device – on my Raspberry Pi ZeroW, while the second (Figure 4.9) shows this on our "usual" x86_64 Ubuntu 18.04 VM:
Figure 4.8 – IRQ status on a Raspberry Pi ZeroW
In the preceding /proc/interrupts output, one line (or record) is emitted for each IRQ line on the system. Let's interpret each column of the output:
- The first column is the IRQ number that's been allocated.
- The second column (onward) shows the number of hardirqs that have been serviced by each CPU core...