A newly installed database server is experiencing high CPU utilization, with `top` showing a significant percentage for `sy` (system CPU usage) and `si` (software interrupts). This occurs even when the database itself is not under heavy load. The server has multiple network interfaces, and the administrator suspects excessive network interrupt handling. Which command would help identify which specific network interface is generating the most software interrupts?
- A`vmstat 1` to monitor overall system activity including software interrupts.
- B`cat /proc/interrupts` to view interrupt statistics per CPU and device.
- C`netstat -s` to display summary network statistics.
- D`iostat -x 1` to check disk I/O utilization.
Show answer & explanationAnswer & explanation
Correct answer: B. `cat /proc/interrupts` to view interrupt statistics per CPU and device.
High `sy` and `si` (software interrupts) in `top` indicate the kernel is spending a lot of time processing interrupts, often from network cards. `cat /proc/interrupts` provides a detailed breakdown of hardware (IRQ) and software (NMI, LOC, SPU, ERR, MIS) interrupt counts, specifically showing which device (e.g., `eth0`, `eth1`) is associated with which IRQ and how many interrupts it has generated per CPU core. This is the most direct way to pinpoint the source of high interrupt load.
Why the other options are wrong
- A. `vmstat 1` provides overall system statistics, including software interrupts (`si`), but it doesn't break down which *device* is causing them, only the total system count.
- C. `netstat -s` provides summary network statistics, but it doesn't offer a per-device breakdown of interrupt counts at the kernel level, which `cat /proc/interrupts` does.
- D. `iostat -x 1` monitors disk I/O, which is unrelated to software interrupt load from network cards.
/proc/interrupts for Interrupt Load
The `/proc/interrupts` pseudofile provides detailed information about interrupt requests (IRQs) handled by the Linux kernel. It lists the number of interrupts received by each CPU core for various devices, making it invaluable for diagnosing high `sy`/`si` CPU usage caused by excessive hardware or software interrupt handling, especially from network interfaces.
- Shows interrupt counts per CPU and device.
- Distinguishes hardware (IRQ) and software interrupts.
- Crucial for identifying interrupt-related bottlenecks (e.g., busy NICs).
Memory trick: PROC INTERRUPTS reveals the source of the CPU's jitters.